title: Repopulating list from Parcelable ArrayList
body: <p>I have a ListView that uses an ArrayAdapter.  The items in the ArrayAdapter are a custom object I've created.</p>
  
  <p>I've extended this custom object from Parcelable.  When the user rotates the screen and the instanceState is saved, it writes the ArrayList to the outState.  When the ListActivity is recreated, the instanceState is read back in to the ArrayList.  In onResume(), I then assign the ArrayList to the ArrayAdapter's items variable, and then call setAdapter on the ListView with the ArrayAdapter.</p>
  
  <p>Unfortunately, nothing shows up in the ListView.</p>
  
  <p>I've debugged through and everything seems to be working perfectly fine until setAdapter is called.  The ArrayList is read back in from the instanceState, all the data is there and preserved perfectly.</p>
  
  <p>Any ideas?</p>
  
  <p>Update:</p>
  
  <p>I've fixed the issue.  I'll try to write an explanation here until stackoverflow lets me create an answer.</p>
  
  <p>In onCreate(), I instantiate a new instance of my ArrayList.  I then give that ArrayList to a new instance of my ArrayAdapter and call setAdapter on the ListView with this ArrayAdapter.  After onCreate(), onRestoreInstanceState() gets called.  In onRestoreInstanceState(), I essentially set my ArrayList to a new ArrayList (the one read from the InstanceState).  Even though I then point my ArrayAdapter's item variable at this new ArrayList, the ArrayAdapter seems to still be pointing at the old empty one.  Thus, nothing shows up in the list.  I've altered onRestoreInstanceState to copy the ArrayList read from the InstanceState to the already-declared ArrayList from onCreate().</p>