Indeed, you do not need to use the built-in widgets to control your preferences; for example, in my application, I use PreferenceScreen to bring up a multi-choice dialog box with a custom list / adapter. If you want to process your own key / value store, you can bind the preference using the findPreference () method, set the value to PreferenceActivity onCreate (), and store the value in onPause () activity. Exploring the key / value store of preferences can be done using getSharedPreferences (file, MODE.PRIVATE) and the associated retrieval method. To edit them, take the returned SharedPreferences object and call edit () / commit () after changing it.
Does this question answer your question?
source share