Reputation: 1969
I have read that you can create more that one shared pref file, but I don't know how. This is how I normally use shared prefs.
SharedPreferences get;
SharedPreferences.Editor save;
get = PreferenceManager.getDefaultSharedPreferences(context);
save = PreferenceManager.getDefaultSharedPreferences(context).edit();
This makes the file named package.name_preferences.xml
. So how can I create the file package.name_fileNames.xml
and how I write and read from it?
Upvotes: 0
Views: 88
Reputation: 93561
Use getSharedPreferences(String name, int mode) on the activity instead of using the preference manager.
Upvotes: 1