Uploaded February 2017 | Updated November 2026, 3 hours ago
Tutorial creating a custom options screen. Options screen uses SharedPreferences to store a value, lets other activities read it, and allows the user to change the value. The options and a default value are stored in resource files.
For the standard Android settings activity, have a look at the documentation: developer.android.com/guide/topics/ui/settings.html
Related Videos:
--------------------------
- RadioButtons: youtu.be/_yaP4etGKlU
- Launching 2nd activity: youtu.be/B1oaE0Odqes
Steps:
---------------
1. Starting from RadioButton tutorial: youtu.be/_yaP4etGKlU
- Added main activity which will display the saved value.
2. Write a value to SharedPreferences when selected on UI.
3. Read value from SharedPreferences.
4. Update Options activity's UI with the currently selected value at startup.
5. Use the stored value in other Activities.
6. Read the default value from resource file.
Tutorial creating a custom options screen. Options screen uses SharedPreferences to store a value, lets other activities read it, and allows the user to change the value. The options and a default value are stored in resource files.
For the standard Android settings activity, have a look at the documentation: developer.android.com/guide/topics/ui/settings.html
Related Videos:
--------------------------
- RadioButtons: youtu.be/_yaP4etGKlU
- Launching 2nd activity: youtu.be/B1oaE0Odqes
Steps:
---------------
1. Starting from RadioButton tutorial: youtu.be/_yaP4etGKlU
- Added main activity which will display the saved value.
2. Write a value to SharedPreferences when selected on UI.
3. Read value from SharedPreferences.
4. Update Options activity's UI with the currently selected value at startup.
5. Use the stored value in other Activities.
6. Read the default value from resource file.










