I have an option menu when the activity looses focus the selected option menu item(s) retain state but when my activity is destroyed all the options are reset.
How can I save the state of the selected preference after resuming from a destroyed state? Having problem visualizing how to implem开发者_如何转开发ent [Shared Preferences][1] for the code.
(Only needed for the boolean values but I have included the static menu items)
You probably want to create some shared preferences. Those, and other data storage options are described in Data Storage.
精彩评论