title: How to declare ArrayAdapter without initializing it
body: <p>I'm new to Kotlin, I have two activities, first page calls second page, then second page finishes and saves data to a table. First activity has a listview getting populated from the same table. I figured the way to do it might be to override the onResume and call the arrayAdapter.notifyDataSetChanged().</p>
  
  <p>However I can't figure out how to move my local arrayAdapter variable to become a global variable.</p>
  
  <pre><code>val adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, arrayList)
  </code></pre>
  
  <p>Is there a better way to do this? Maybe overriding the onActivityResult method? But still not sure if that's the best approach</p>