title: Saving and restoring ListView with Custom List Adapter
body: <p>I'm currently using a <code>custom list adapter</code> and modifying the rows of the listview at runtime (changing text, buttons etc).</p>
  
  <p>I want to find a way to save/restore the changes made to the <code>listview</code> at runtime when I start another fragment and then come back to the fragment containing the listview. </p>
  
  <p>Currently the listview is being reloaded every time and all the runtime changes are lost.</p>
  
  <p>The following shows how I am setting the list adapter.</p>
  
  <pre><code> public void setAdapterToListView(ArrayList&lt;item&gt; list) {
          ItemList = list;
          ItemAdapter adapter = new MenuItemAdapter(list, getActivity(), this);
          ItemListView.setAdapter(adapter);
      }
  </code></pre>
  
  <p>I am then using a custom list adapter to make the changes (mentioned above) at runtime. Here's a snippet of how I am changing things at runtime: </p>
  
  <pre><code>if (holder.qty.getText().toString().equals("Qty")) {
      relativeLayout.setBackgroundColor(row.getResources().getColor(R.color.navDrawerL ightBlue));
      holder.qty.setText("1");
      holder.qty.startAnimation(anim);
      holder.removeItem.setBackgroundResource(R.drawable.remove_item_red);
      holder.removeItem.setEnabled(true);
  
     ...
  </code></pre>
  
  <p>Is there a recommended way to approach this issue?</p>