开发者

Saving Option Menu InstateState Android

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜