Reputation: 1600
I'm writing a simple todo List application. I am unclear on saving an applications state. İ just need the save state of ArrayList.
ArrayList<CheckBox> alCheckbox = new ArrayList<CheckBox>();
i tried to override onSaveInstanceState method. But i cant.
How can i save the state of ArrayList.
Thanks.
Upvotes: 0
Views: 606
Reputation: 39992
onSaveInstanceState is meant to be used for application restarts. For instance when the user changes the orientation on the screen. You want a permanent storage solution for data that should persist the application being launched, stopped, killed, etc... For a more permanent solution like SharedPreferences, Internal/External Storage, or SQLite Databases. Here's the tutorial on Data Storage options.
Upvotes: 1