title: Scroll to first completely visible item in recyclerView
body: <p>I am trying to scroll to first completely visible item while scrolling and I am doing following:</p>
  
  <pre><code>recyclerView.addOnScrollListener(new OnScrollListener() {
          @Override
          public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
              super.onScrollStateChanged(recyclerView, newState);
          }
  
          @Override
          public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
              super.onScrolled(recyclerView, dx, dy);
              LinearLayoutManager layoutManager = ((LinearLayoutManager) recyclerView
                      .getLayoutManager());
  
              int position = layoutManager.findFirstCompletelyVisibleItemPosition();
  
              if(position&gt;0){
                  recyclerView.smoothScrollToPosition(position);
                  Log.e(TAG, "onScrolled: just called smooth scroll &gt;&gt; "+position );
              }
          }
      });
  </code></pre>
  
  <p>I am getting correct position of firs completely visible item but scroll to it [trying to scroll it to the initial position of visible portion of the screen] is not working. I tried to achieve it by doing following:</p>
  
  <p>1.</p>
  
  <pre><code>recyclerView.smoothScrollToPosition(position);
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>layoutManager.smoothScrollToPosition(recyclerView, null, position);
  </code></pre>
  
  <p>they make no change!! I googled for solution but I am not getting the right one. Please, suggest me how can I achieve that ?</p>