title: refresh array adapter when a new activity is openend
body: <p>for this arrayAdapter there is a number passed on from the previous activity (<code>int location</code>), which gets chosen in that activity. This number is the index of an <code>ArrayList&lt;List&lt;String&gt;&gt;()</code>, this is a list of lists with 5 lists. The Toast message shows that the number gets updated. But the listView only shows the list in the ArrayList with index 0. So I was wondering how you &quot;refresh&quot; this listView.</p>
  <pre><code>Intent intent = getIntent();
  int location = intent.getIntExtra(&quot;location&quot;, 0);
  
  Toast.makeText(this, String.valueOf(location), Toast.LENGTH_SHORT).show();
  
  ArrayAdapter&lt;String&gt; coursesAdapter = new ArrayAdapter&lt;&gt;(
     this,
     android.R.layout.simple_list_item_1,
     allLists.get(location)  
  );
  </code></pre>