Pergunta

Hi Stackoverflow members!

I have a 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 implement [Shared Preferences][1] for the code.

(Only needed for the boolean values but I have included the static menu items)

Any expert comments are greatly appreciated.

Foi útil?

Solução

You probably want to create some shared preferences. Those, and other data storage options are described in Data Storage.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top