title: Refresh ListView after updating in another Activity
body: <p>I have two simple Activities -
  Activity1: ListView from an Array
  Activity2: EditText for editing the clicked row in Activity1</p>
  
  <p>When I edit the value in Activity2 and returning to Activity1, the ListView doesn't reload the new value.</p>
  
  <p>I want to refresh the ListView when I return from Activity2 or resume Activity1 or something that will update the list.</p>
  
  <p>My code:</p>
  
  <pre><code>static ArrayAdapter&lt;String&gt; dataAdapter;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
              // Loading the values to list array
          String[][] fulllist = loadArrays();
          String[] list = new String[fulllist.length];
          for(int i = 0; i&lt;fulllist.length; i++) {
              list[i] =  fulllist[i][1];
              }
              // --------------------------------
  
              dataAdapter = new ArrayAdapter&lt;String&gt;(this,
                                  android.R.layout.simple_list_item_1,
                                  list);
              setListAdapter(dataAdapter);
              }
  @Override
  public void onResume() {
          super.onResume();
          // Loading the values to list array
          String[][] fulllist = loadArrays();
          String[] list = new String[fulllist.length];
          for(int i = 0; i&lt;fulllist.length; i++) {
              list[i] =  fulllist[i][1];
              }
          // --------------------------------
  
          dataAdapter = new ArrayAdapter&lt;String&gt;(this,
                              android.R.layout.simple_list_item_1,
                              list);
          dataAdapter.notifyDataSetChanged();
  }
  </code></pre>
  
  <p>loadArrays() is just method that converts from SharedPreferences to String Array. Activity2 saves the new data in SharedPreferences and than Activity1 can read it (with the new data).
  If I return to the "main activity" (it is not Activity1) and than come back to Activity1 - the new data is shown, but I want this data will be updated when I return from Activity2 immediately. </p>
  
  <p>loadArrays() method: pastebin.com/MHwNC0jK </p>
  
  <p>Thanking you in advance!</p>