What I am doing:
The app I'm developing has a clickable list of subjects that is systematically added by the user. At the end of a term/semester, the user clears the list for the next, deleting all the files in which the user values are saved.
The Question:
Is it better practice to simply refresh the activity I am working on by using:
finish();
startActivity(getIntent());
or to clear the list by re-initiating the the ArrayAdapter (named listAdapter) and resetting it using:
listAdapter = new ArrayAdapter<String>(this, R.layout.simplerow, R.id.rowTextView);
testListView.setAdapter(listAdapter);
or is there a better way all together?
change the values in array and call adapter.notifyDataSetChanged();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With