Planting a Spinner in a layout is straightforward, since there are so many samples and tutorials showing how to do just this.
But how to I plant a Spinner in a PreferenceScreen?
Is this possible/doable at all?
Note: I have already conducted an extensive search. There is no such thing as a "SpinnerPreference". I wish there were.
You can create a custom Preference
by extending the Preference
class or DialogPreference
class.
There is an example in the Settings guide on developer.android.com.
Alternately you might want to consider using a ListPreference
. The user gets to pick one value from a list of values. The UI is similar to the images in the tutorial you linked to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With