0

is there a way not to save the changes in shared_pref, instead save it to sqlite using

public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,String key) 
{
}

i can't seem to "intercept" the data, as it is always writing to shared_pref

any inputs would be great

1 Answer 1

1

Intercept the change with Preference.OnPreferenceChangeListener.onPreferenceChange(), save to sqlite, and return false.

However this may cause the visible state of the preference to not change so you may have to update it yourself.

Barry

1
  • cool, that's exactly what i'm looking for. i'll mark it as an answer after 3 mins, as it wont allow me now. thanks again :)
    – Joe
    Jul 13, 2011 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.