Making the Note To Self app's settings persist

We have already learned how to save data to the device's memory. As we implement saving users' settings, we will also see again how we handle the CheckBox, RadioGroup, and RadioButton input.

Coding the SettingsActivity class

Most of the action will take place in the file. So, click on the appropriate tab and we will add the code a bit at a time.

First, we need some member variables that will give us a working SharedPreferences and Editor reference. We also want a member variable to represent each of the users' settings options. We need one for sound (boolean for on or off) and int for their preferred animation option (fast, slow, or none). Furthermore, as you will see in the next ...

Get Android Programming for Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.