title: Android onResume update list adapter
body: <p>I'm using a list adapter to show different stores, when someone selects a store it takes them to a new activity where they can add the store to favorite on that screen. </p>
  
  <p>There is a Back button on that calls <code>finish();</code> that goes back to the screen with the listview. </p>
  
  <p>Now the problem is the listview isn't updated (ie. doesn't show that the store is added to favorite already). I tried this code but no luck:</p>
  
  <pre><code>@Override
  public void onResume() {
      super.onResume();
      list.setAdapter(null);      
      updateMyList();
      adapter=new LazyAdapter(this, ((String[])names.toArray(new String[0])), 
          ((String[])status.toArray(new String[0])));
      list.setAdapter(adapter);
  }
  </code></pre>
  
  <p><code>updateMyList()</code> calls the server API and updates the names and status arrays.</p>
  
  <p>With this code the list doesn't really update...</p>