How to show exact number of items in RecyclerView?
<p>I am trying to show exact (eg. 3 items) in RecyclerView. Our web application shows like this:</p>

<p><a href="https://i.stack.imgur.com/Avxaf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Avxaf.png" alt="enter image description here"></a></p>

<p>If I move items:</p>

<p><a href="https://i.stack.imgur.com/bOGhV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bOGhV.png" alt="enter image description here"></a></p>

<p>and release the mouse, it automatically comes to this:
<a href="https://i.stack.imgur.com/5t2PZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5t2PZ.png" alt="enter image description here"></a></p>

<p>In Android, I am showing images using RecyclerView:</p>

<p><a href="https://i.stack.imgur.com/UTJ3D.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UTJ3D.png" alt="enter image description here"></a></p>

<p><strong>How to show exactly 3 items in the visible area of RecyclerView? How to avoid to show "half" items? Is this possible?</strong></p>

<p>RecyclerView:</p>

<pre><code>        &lt;android.support.v7.widget.RecyclerView
            android:layout_width="wrap_content"
            android:layout_height="130dp"
            android:id="@+id/rvProducts" /&gt;
</code></pre>

<p>One item in recycler view:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;

    &lt;ImageView
        android:layout_width="100dp"
        android:layout_height="wrap_content"
        android:padding="10dp"
        android:id="@+id/ivProduct"
        android:src="@drawable/noimage"/&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>Code:</p>

<pre><code>    LinearLayoutManager layoutManager
            = new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false);
    RecyclerView productImageList = (RecyclerView) view.findViewById(R.id.rvProducts);
    productImageList.setLayoutManager(layoutManager);
    GalleryRecyclerAdapter adapter = new GalleryRecyclerAdapter(images);
    productImageList.setAdapter(adapter);
</code></pre>