Using PreferenceActivity, Android automatically saves simple preferences such as checkboxes being checked etc. I have a couple of questions:
1 – where do these preferences get saved? Is it the same preferences file that PreferenceManager.getDefaultSharedPreferences(Context) returns?
2 – is there a way to use a difference set of preferences? I.e. with context.getSharedPreferences (String name, int mode) you supply a string to identify a particular set of preferences. Is it possible to save preferences from a PreferenceActivity in a set of preferences returned like this?
Thanks in advance,
Barry
Yes it’s possible.
Have a look at that :
https://idlesun.blogspot.com/2012/12/how-to-make-preferenceactivity-use-non.html
addPreferencesFromResource()have to be called aftersetSharedPreferencesName()!