title: Android Horizontal Snapping scrollable RecyclerView
body: <p>Is there any solution for my question?</p>
  
  <p>I am currently using SnapHelper but the result is like this.</p>
  
  <p><a href="https://i.stack.imgur.com/RkaTe.gif" rel="nofollow noreferrer">Snapping RecyclerView</a></p>
  
  <p>As you can see, the scrollview can't stop in the first item but other items already able to center focus when scrolling. How to achieve center focus of every items?</p>
  
  <p>Code:</p>
  
  <pre><code>public class ScrollingSnap1 extends AppCompatActivity {
      private ArrayList&lt;String&gt; arraylist = new ArrayList&lt;&gt;();
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_scrolling_snap1);
          arraylist.add("1111111111111111111111111111111111111111");
          arraylist.add("2222222222222222222222222");
          arraylist.add("3333333333333333333333333333333333333333333333333");
          arraylist.add("99999999");
          arraylist.add("1010101010101001010101010");
          Adapter1 adapter1 = new Adapter1(arraylist);
          RecyclerView recyclerview = (RecyclerView)findViewById(R.id.recycler2);
          SnapHelper snapHelper = new LinearSnapHelper();
          recyclerview.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, true));
          recyclerview.setAdapter(adapter1);
          snapHelper.attachToRecyclerView(recyclerview);
      }
  }
  </code></pre>