Thanks for the reply. In answer to your questions:
> Are you calling commit() on the editor to actually save your preferences? Yeah, the bespoke preference screen that isn't backed by a subclass of PreferenceActivity has buttons which allow the user to persist their preference changes. The codes updates the preference and calls commit(). > Are you sure both Activities are using the same SharedPreferences object (the > default global one)? The bespoke one is using a call to getSharedPreferences and passing in a name for the preferences that is unique to my application. This has been working fine for a long time and has only had problems when introducing another preference screen that is backed by a subclass of PreferenceActivity. > What do you mean "overwritten"? What I mean is that any preference that I store using the bespoke preference screen is persisted fine. But after I change a preference from the screen that is backed by an Activity that extends PreferenceActivity, the value that I set originally in my bespoke screen is no longer there. > Are you using the same keys to store different things in both activities? Nope. > Are the first set of values being set to default? Nope. > What happens if you use the PreferenceActivity first and then your custom > one? Does that overwrite the PreferenceActivity settings? Good question. I will try that a little later and see what happens. Its really quite odd and I need to do a little more testing to try to determine the precise cause of the problem. On Mar 17, 4:33 pm, TreKing <treking...@gmail.com> wrote: > On Tue, Mar 16, 2010 at 5:33 PM, Pete <petesla...@gmail.com> wrote: > > I am finding that any data that I store from the first activity, my > > bespoke preference screen which manually adds the data using a > > StoredPreferences.Editor instance is overwritten once the user selects > > an option in my activity that extends PreferenceActivity. > > Are you calling commit() on the editor to actually save your preferences? > Are you sure both Activities are using the same SharedPreferences object > (the default global one)? > What do you mean "overwritten"? > Are you using the same keys to store different things in both activities? > Are the first set of values being set to default? > What happens if you use the PreferenceActivity first and then your custom > one? > Does that overwrite the PreferenceActivity settings? > > ------------------------------------------------------------------------------------------------- > TreKing - Chicago transit tracking app for Android-powered > deviceshttp://sites.google.com/site/rezmobileapps/treking -- 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