title: How to show all data from list in Recycler view
body: <p>The problem I am having is that the recycler view is not displaying all item list. In my particular case I have 38 items and it is missing some of them. I had 34 and it was working just fine. 
  I have a search bar and when I type in the ids of the missing items, it shows them. I can't find where the problem could be. Any suggestions on what to look for or changes I could make, are very welcome. Feel free to ask for any code you think is needed.</p>
  
  <p>This is how I call the adapter</p>
  
  <pre><code>public void buildCollectionSalesAdapter(){
          final String filter = edtFindSale.getText().toString().trim();
          final SaleHeader saleHeaderModel = new SaleHeader();
          List&lt;SaleHeader&gt; saleHeaderList1 = new SaleHeader().getSaleHeadersAll();
          int limit = saleHeaderList1.size();
          saleHeaderList = saleHeaderModel.getSaleHeaderCollectPagination(limit, 0, filter,
                  config.showVerified, config.allCustomers);
          final SalesAdapter salesAdapter = new SalesAdapter(saleHeaderList, null, context,
                  CollectionFragment.this, null, getActivity());
  
          rcvCollection.setAdapter(salesAdapter);
          registerForContextMenu(rcvCollection);
  
          rcvCollection.addOnScrollListener(new RecyclerView.OnScrollListener() {
              @Override
              public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
                  super.onScrollStateChanged(recyclerView, newState);
              }
  
  
              @Override
              public void onScrolled(RecyclerView recyclerView, int dx, int dy)
              {
                  if(dy &gt; 0) //check for scroll down
                  {
                      totalItemCount = linearLayoutManager.getItemCount();
                      visibleItemCount = linearLayoutManager.getChildCount();
                      firstVisibleItem = linearLayoutManager.findFirstVisibleItemPosition();
  
                      if (loading) {
                          Log.i(TAG, "scrolled loadin "+ loading+" "+saleHeaderList.size());
                          if (totalItemCount &gt; previousTotal) {
                              loading = false;
                              previousTotal = totalItemCount;
                          }
                      }
                      if (!loading &amp;&amp; (totalItemCount - visibleItemCount) &lt;= (firstVisibleItem + VISIBLE_THRESHOLD)) {
                          Log.i(TAG, "scrolled !loadin "+ loading+" "+saleHeaderList.size());
                          // Hemos llegado al final
                          if(salesAdapter.getItemCount()&gt;1) {
                              offset = offset + limit;
                              saleHeaderList.addAll(saleHeaderModel.getSaleHeaderCollectPagination(limit,
                                      offset, filter, config.showVerified, config.allCustomers));
                              recyclerView.post(new Runnable() {
                                  public void run() {
                                      // There is no need to use notifyDataSetChanged()
                                      salesAdapter.notifyItemRangeInserted(offset, saleHeaderList.size());
                                  }
                              });
                              loading = true;
                          }
  
                      }
                  }
              }
          });
      }
  </code></pre>
  
  <p>I found out that when I change the limit of the pagination from 10 to the list size it shows all the data.</p>
  
  <p>I made it work by changing the pagination form 10 to 15, but still do not know waht is causng the error</p>