I am facing now a strange issue.

What I have done is to perform the consistency checks in the
onSharedPreferenceChanged, and if something is wrong, to reedit the
value that is being changed to the default value (if the user is
trying to enable the mail sending but no mail address is set, I edit
back the check option to false) and then I show up an error dialog.

What is happening is that the dialog shows up correctly, but the value
is not changed back to false. I suspect that I can't change preference
values in onSharedPreferenceChanged, or that the value that is being
changed is stored after the framework fires my
onSharedPreferenceChanged method (I will try to take a look at the
source code this evening), or that the commi()t on the preference
editor is something like a nested tx.

However, is there another way to do this? Am I missing something?

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

Reply via email to