Hello,

I know this is really basic but I am trying to get to grips with
preferences.
I have defined an xml file and started a PreferenceActivity to read that XML
file so as to create and store some preference key-value pairs. However this
is in activity B. In activity A which launched B I also want to read
preferences.
The android documentation has:

SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);

at http://developer.android.com/guide/topics/data/data-storage.html#pref
http://developer.android.com/reference/android/preference/PreferenceActivity.html


but since I didn't defined a PREFS_NAME in the PreferenceActivity
(activity B) I really don't know what to use in activity A as the name.

Furthermore, what's the point of having more than one preference file
per application? What's a practical example of this?

Thanks for your help,

John Goche
<http://developer.android.com/guide/topics/data/data-storage.html#pref>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to