title: Can RecyclerView preload the first n item on the list?
body: <p>I have a listing of some item and I am using <code>Glide</code> to load an image onto an ImageView. The problem is, if a particular item, scroll-enter the screen, that is the only time I saw image is being drawn using <code>Glide</code>. This is noticeable when I put crossfade when the image has finished loading.</p>
  
  <p>I know from the start the number of items needed and couple of other items like header and footer. I am thinking of just making a very long view to handle everything and dynamically add those known items at <code>onCreate</code> and just use <code>ScrollView</code> which I have done. I currently implemented a simpler way using a <code>RecyclerView</code> but I having trouble regarding the timing of <code>onBindView</code> call. </p>
  
  <p>What I want is to load first 5 items before they become visible into the screen. This I hope will trigger the method where I bind the image onto the ImageView with Glide before it is fully visible into the screen. </p>
  
  <p>I followed this <a href="https://androiddevx.wordpress.com/2014/12/05/recycler-view-pre-cache-views/" rel="nofollow">tutorial</a> and its not working for me. Here is my current setup:</p>
  
  <pre><code>mComicListingAdapter = new ComicListingsAdapter(getContext(), Constants.CHAPTERS, (ComicListingsAdapter.Callback) getActivity());
  mRecycleViewHomeScreen.setAdapter(mComicListingAdapter);
  mRecycleViewHomeScreen.setHasFixedSize(true);
  mRecycleViewHomeScreen.setItemViewCacheSize(42);
  mRecycleViewHomeScreen.setLayoutManager(pcll);
  </code></pre>
  
  <p>Is this possible in RecyclerView? Or maybe I should try dynamically creating <code>ImageView</code> and appending them to a parent <code>View</code> as I have done so. It looks great but there is a lot of things to do in my case using this method. I am just curious if I can direct <code>RecyclerView</code> to load n-amount of items in advance. </p>
  
  <p>Thanks!</p>