title: How do I refresh a ListFragment efficiently?
body: <p>I have a ListFragment with an ArrayAdapter to display a list of objects. I want to refresh the ListFragment's contents. The items themselves change their text a little and also change their order. I have over one hundred items and <strong>the only way I've found to do this is clear the list and re-add them, but this feels ineffcient.</strong></p>
  
  <p><em>For example:</em></p>
  
  <p>ListFragment display unordered:</p>
  
  <pre><code>Object A
  Object D
  Object F
  Object B
  Object E
  Object C
  </code></pre>
  
  <p>ListFragment display ordered:</p>
  
  <pre><code>Object A
  Object B
  Object C
  Object D
  Object E
  Object F
  </code></pre>
  
  <p>I set up my ArrayAdapter like this:</p>
  
  <pre><code>mAdapter = new ArrayAdapter&lt;Store&gt;(mContext,
      android.R.layout.simple_list_item_1,
      OtherClass.list);
  mAdapter.setNotifyOnChange(true);
  setListAdapter(mAdapter);
  </code></pre>
  
  <p>"OtherClass" is:</p>
  
  <pre><code>public class OtherClass extends Object {
  
      public ListArray&lt;Object&gt; list;
      ...
  }
  </code></pre>
  
  <p><strong>The code in question:</strong></p>
  
  <pre><code>mAdapter.clear();
  for (Object o : list) {
      mAdapter.add(store);
  }
  </code></pre>
  
  <p>I've already read a lot of answers about how it works and how to use <code>mAdapter.notifyDataSetChanged()</code> but none of them solve my problem or answer my question. <strong>Is the only way to refresh the list done by adding/removing something from the list?</strong></p>