public class DropDownPreference
extends ListPreference

   ↳ androidx.preference.Preference
     ↳ androidx.preference.DialogPreference
       ↳ androidx.preference.ListPreference
         ↳ androidx.preference.DropDownPreference

A ListPreference that presents the options in a drop down menu rather than a dialog.


Inherited constants

Public constructors

DropDownPreference(Context context)
DropDownPreference(Context context, AttributeSet attrs)
DropDownPreference(Context context, AttributeSet attrs, int defStyle)
DropDownPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public methods

void onBindViewHolder(PreferenceViewHolder holder)

Binds the created View to the data for this preference.

void setEntries(CharSequence[] entries)

Sets the human-readable entries to be shown in the list.

void setValueIndex(int index)

Sets the value to the given index from the entry values.

Protected methods

ArrayAdapter createAdapter()

By default, this class uses a simple ArrayAdapter.

void notifyChanged()

Should be called when the data of this Preference has changed.