I have a preference layout file, and i want to store all the changes in my layout
so the next time I open application it has new changes
Example—> Two Radio Buttons in an XML file 1) Blue (Checked)
2) Red (Unchecked)
Now when I Checked it to Red and close The Application then at next time when i run again
then it should has this manner in same XML file 1)Blue (Unchecked)
2)Red (Checked)
so please tell me how I do this.
waiting for your reply, thanks
Devang,
You need a
ChecKBoxPreferenceto store the value inSharedPreferencesThis website provides a pretty good tutorial of all of the Preferences types that Android provides and how to save/restore them: http://www.kaloer.com/android-preferences
Good luck!