I want to have an element in my preference menu that does the following:
Possibilities I thought of:
PreferenceScreen
and showing options as checkBoxes
, but I don't know where to place the logic of max 2 options.DialogPreference
and doing it by hand.What's the best way?
Extending DialogPreference
would get you the closest in terms of look-and-feel; the Preference
classes are fairly unflexible and un-extendable in my experience.
I can't remember too much about PreferenceScreen
, but I imagine it's similar.
In an app I worked on, we ended up using separate activities, launched via Intent
from a Preference
item onClick. This allowed us to easily develop preference screens that require validation logic a bit more complex than the usual.