title: Remove spacing between items in RecyclerView android
body: <p>I am using a RecyclerView to show a List of Items and I need to remove the default spacing between Items. I'm trying to set a RecyclerView.LayoutParams and set margins to zero on my LinearLayoutManager but didn't work!</p>
  
  <p>Here is my code:</p>
  
  <p><strong>layout/fragment_recycler.xml</strong></p>
  
  <pre><code>   &lt;android.support.v4.widget.SwipeRefreshLayout
          android:id="@+id/freshSwipeView"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/freshRecyclerView"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:scrollbars="vertical" /&gt;
      &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  </code></pre>
  
  <p><strong>layout/cardview_recycler.xml</strong></p>
  
  <pre><code>&lt;android.support.v7.widget.CardView
      android:id="@+id/card_view"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout
          android:id="@+id/content"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal"&gt;
  
          &lt;mypackagename.ui.view.RecyclingImageView
              android:id="@+id/avatar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:scaleType="fitXY"
              android:adjustViewBounds="true"
              android:src="@drawable/img_no_avatar" /&gt;
  
          &lt;TextView
              android:id="@+id/username"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:gravity="center_vertical"
              android:singleLine="true"
              android:ellipsize="end"
              android:padding="@dimen/spacing"
              android:textColor="@color/black"
              android:layout_alignParentBottom="true"
              android:textSize="@dimen/text_smallest" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p><strong>RecyclerFragment.java</strong></p>
  
  <pre><code>    /* Setting Layout Manager */
      mLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
      RecyclerView.LayoutParams params = new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT);
      params.setMargins(0, 0, 0, 0);
      mLayoutManager.canScrollVertically();
      mRecyclerView.setLayoutManager(mLayoutManager);
  </code></pre>
  
  <p>I need help...</p>