added in version 24.1.0
belongs to Maven artifact


public class DropDownPreference
extends ListPreference


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


Inherited XML attributes

From class

Inherited constants

From class

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 view)

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.

void onClick()

Processes a click on the preference.

Inherited methods

From class