title: OnItemSelectedListener, ListView and item recycling
body: <p>I have a bunch of items in a ListView. Each item contains several editable views. I want to save the changes the user makes to these. The event for the save to occur is when an the item loses focus.</p>
  
  <p>I currently see 2 ways:</p>
  
  <pre><code>    View.OnFocusChangeListener() with  onFocusChange(View v, boolean hasFocus)
  </code></pre>
  
  <p>This works but is messy since each item contains several editable Views. I would much rather save when the whole item is defocused.  My attempts to simplify so far have only complicated things.</p>
  
  <p>If there was a OnItemDeSelectedListener it would be perfect, but there is only the opposite:</p>
  
  <pre><code>    AdapterView.OnItemSelectedListener() with onItemSelected(AdapterView&lt;?&gt; adapterView, View view, int i, long l)
  </code></pre>
  
  <p>On the surface this looks good. I just create the variable lastSelectedView so I know what the last selected (deselected) item was.
  The problem is how ListView recycles views. I believe there is no guarantee that the adapter has not recycled lastSelectedView and thus changed the data it contains. Is this a reasonable assumption?</p>
  
  <p><strong>Is there a reasonable way to get around the recycling view problem with OnItemSelectedListener?</strong></p>