I am trying to store 2 String ArrayLists and 1 Spanned ArrayList in a SaveInstanceState in my android app. Is this possible? If so, can you provide an example?
ArrayListList<String> businessNames = new ArrayList<String>();
List<Spanned> businessInfo = new ArrayList<Spanned>();
ArrayList<String> businessCategories = new ArrayList<String>();
protected void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
bundle.putStringArrayList("businessNames", businessNames);
bundle.putStringArrayList("businessCategories", businessCategories);
// ??????
bundle.putParcelableArrayList("businessInfo", businessInfo);
}
Solved this myself. Here is the code below...
The new asynctask
DisplaySavedResults
simply just does the UI changing in theonPostExecute
. ThedoInBackground
is left empty.