title: DividerItemDecoration Horizontal not appearing in center
body: <p>I am using DividerItemDecoration from support library.</p>
  
  <p>following is code to add decoration</p>
  
  <pre><code> GridLayoutManager gridLayoutManager = new GridLayoutManager(context, 3);
   recyclerView.setLayoutManager(gridLayoutManager);
   recyclerView.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.HORIZONTAL));
  </code></pre>
  
  <p>But the dividers are not appearing in center horizontally.</p>
  
  <p>Following is screen shot of it.</p>
  
  <p><a href="https://i.stack.imgur.com/LzPZQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LzPZQ.png" alt="enter image description here"></a></p>
  
  <p>Following is item layout</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_gravity="center"
  android:clickable="true"
  android:gravity="center"
  android:orientation="vertical"
  android:paddingBottom="8dp"
  android:paddingTop="8dp"&gt;
  
  
  &lt;ImageView
      android:id="@+id/imgFacility"
      android:layout_width="30dp"
      android:layout_height="30dp"
      android:layout_gravity="center"
      android:foreground="@drawable/page_main_category_home_grid_selector"
      android:gravity="center"
      android:src="@drawable/plane_img"
      android:tint="?colorAccent" /&gt;
  
  
  &lt;TextView
      android:id="@+id/txtFacilityName"
      mediumFontPath="fonts/montserrat-medium.ttf"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:layout_marginTop="2dp"
      android:ellipsize="end"
      android:gravity="center"
      android:maxLines="2"
      android:minLines="2"
      android:text="Facility\nEWlall"
      android:textColor="#353535"
      android:textSize="12sp"
      tools:ignore="MissingPrefix" /&gt;
  
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Also I tried using <a href="https://github.com/devunwired/recyclerview-playground/blob/master/app/src/main/java/com/example/android/recyclerplayground/GridDividerDecoration.java#L17:14" rel="nofollow noreferrer">GridDividerDecoration</a></p>
  
  <p>Following is output of it
  <a href="https://i.stack.imgur.com/8W7vM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8W7vM.png" alt="enter image description here"></a></p>
  
  <p>Given background color to each layout this is how it looks</p>
  
  <p><a href="https://i.stack.imgur.com/C8Xer.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C8Xer.png" alt="enter image description here"></a></p>