1

How to set different preference defaults based on a user choice?

view story
linux-howto

http://stackoverflow.com – I have an Android application that has many user preferences. Some preferences are custom, meaning that a Preference class modifies a value a little bit. Most of the preferences have defaults, which are applied via call to PreferenceManager.setDefaultValues() that honors such custom preferences. There is a number of common usage scenarios of my application, but currently preference defaults cover only one of them. I want to ask a use about which scenario she would prefer. But I do not know how to apply defaults in the same clean and simple way based on the user choice. Any ideas? (HowTos)