I currently have a listview that is self populated by the user. I would like it so that when the user leaves the activity and comes back, everything the user added is still in the listview. I have been reading about onSaveInstanceState, but I don’t know if that is the right way to do it. Any help would be greatly appreciated. Thanks.
I currently have a listview that is self populated by the user. I would
Share
I am assuming if the user is populating some data, then that data has a store somewhere (SQLite, cloud, etc…). I recommend aggressively storing anything the user enters (i.e. as soon as they click “new” and enter the new list item, push to the database and refresh list). So when the applications onResume() is called, you can grab the data from its source and re-populate the list view. Saving temporarily into SharedPreferences sounds cumbersome (for a list of items).