SpinnerPreference? (How to embed Spinner in the settings screen)

Landing the Spinner in the layout is simple, as there are so many examples and tutorials showing how to do this.

But how do I install Spinner in PreferenceScreen ?

Is this possible / doable?

Note. I have already done an extensive search. There is no such thing as a "SpinnerPreference". I would like to.

+6
source share
1 answer

You can create a custom Preference by extending the Preference or DialogPreference . The following is an example in the Settings Guide on developer.android.com.

Alternatively, you may need to use ListPreference . The user gets one value from the list of values. The user interface is similar to the images in the tutorial that you linked to.

+3
source

Source: https://habr.com/ru/post/945111/


All Articles