title: How to solve problem with recylerView that is not detecting scrolling of this, if I load exactly 10 items while pagination or when it covers screen
body: <p><strong>If I load more than 10 items it works fine. e.g. I select 25 or 50 limits from spinner pagination works fine, but when I select limit 10, then scrolling is not detected inside onScrolled of addOnScrollListener method.</strong></p>
  <p><strong>Or if I load the amount of elements that cover the screen, then we need to scroll further items of recyclerView.</strong></p>
  <p><strong>RecyclerView creation method</strong></p>
  <p>VulnerabilityScanAdapter vulnerabilityScanAdapter = new VulnerabilityScanAdapter(
  getActivity(), callback, vulnerabilityScanPojoList
  );</p>
  <pre><code>        vulnerabilityScanAdapter.notifyDataSetChanged();
          final LinearLayoutManager mLayoutManager = new LinearLayoutManager(getContext(),
                  LinearLayoutManager.VERTICAL, false);
          vulnerabilityScanRv.setLayoutManager(mLayoutManager);
          vulnerabilityScanRv.setItemAnimator(new DefaultItemAnimator());
          vulnerabilityScanRv.setAdapter(vulnerabilityScanAdapter);
  </code></pre>
  <p>// <strong>This is the code for pagination of this recyclerView</strong></p>
  <p>vulnerabilityScanRv.addOnScrollListener(new RecyclerView.OnScrollListener() {</p>
  <pre><code>        @Override
          public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
              super.onScrollStateChanged(recyclerView, newState);
         
          }
  
          @Override
          public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
              super.onScrolled(recyclerView, dx, dy);
            
  
              if(dy &gt; 0){
                  // Scrolling Down
                 
                  if (totalCount &gt; currentPageCount) {
  
                      LinearLayoutManager linearLayoutManager =
                              (LinearLayoutManager) recyclerView.getLayoutManager();
  
                      if (linearLayoutManager != null &amp;&amp;
                              linearLayoutManager.findLastCompletelyVisibleItemPosition() ==
                                      vulnerabilityScanPojoList.size() - 1) {
                          //bottom of list!
                          loadMore();
                      }
  
                  } else {
                      //showSnackForAttributes(true,&quot;No more data avaiable.&quot;);
                  }
  
              }else if(dy &lt; 0){
                  // Scrolling Up
             }
  
          }
      });
  </code></pre>
  <p><strong>I have done debugging to know whether the control is going inside onScrolled method while scrolling or not. It goes inside onScrollStateChanged when it reaches to the bottom of the list.</strong></p>