title: RecyclerView.Adapter hook method issue
body: <p>As the title suggests I have an issue with a RecyclerView Adapter callback hooks.  I currently have 6 items in a <code>RecyclerView</code>, these views are custom views that have their own logic, animations etc.. These views are fine, and work as expected.  However I have an issue when I show a <code>FrameLayout</code> over the <code>RecyclerView</code> layout.  The <code>FrameLayout</code> is nothing special, and I change its Visiblity from <code>GONE</code> to <code>VISIBLE</code>.</p>
  
  <p>When this happens the RecyclerView calls these methods:</p>
  
  <pre><code>@Override public void onViewDetachedFromWindow(RecyclerView.ViewHolder holder)
  
  @Override public void onViewDetachedFromWindow(RecyclerView.ViewHolder holder)
  
  @Override public void onViewRecycled(RecyclerView.ViewHolder holder)
  </code></pre>
  
  <p>These are called for ALL positions (0 - 5).  At this point I stop any animations in my custom views, and reset them to a ready state. So far this seems reasonable, the views are obscured, so these hooks are called.</p>
  
  <p><strong>The Issue</strong> </p>
  
  <p>When I set the overlay <code>FrameLayout</code> from <code>VISIBLE</code> to <code>GONE</code> again the <code>RecyclerView</code> calls <code>onBindViewHolder</code> for the first 4 positions (0-3), it is not called for positions 4 &amp; 5 (confirmed with break points and logging).  This means the views in these positions don't initialise themselves - obviously this is done in <code>onBindViewHolder</code>.</p>
  
  <p>So I'm asking why <code>onBindViewHolder</code> isn't called for the positions it previously recycled, when ALL 6 views in the RecyclerView are visible on screen at the same time?</p>
  
  <p>I would post code, but in this instance I'm only talking about the logic and hooks of the <code>RecyclerView.Adapter</code> class, my implementation is merely using these hooks. </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have a working solution, rather than setting up the custom view in <code>onBindViewHolder</code> I use :</p>
  
  <p>To reset the view:</p>
  
  <pre><code>@Override public void onViewDetachedFromWindow(RecyclerView.ViewHolder holder)
  </code></pre>
  
  <p>To initialise the view:</p>
  
  <pre><code>@Override public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) 
  </code></pre>
  
  <p>These 2 hook methods seem logical opposites of each other, and work as such, however it still is a mystery why <code>onBindViewHolder</code> isn't called for all views.</p>