added in version 24.1.0
belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1

DropDownPreference

public class DropDownPreference
extends ListPreference

java.lang.Object
   ↳ android.support.v7.preference.Preference
     ↳ android.support.v7.preference.DialogPreference
       ↳ android.support.v7.preference.ListPreference
         ↳ android.support.v7.preference.DropDownPreference


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

Summary

Inherited XML attributes

From class android.support.v7.preference.Preference

Inherited constants

From class android.support.v7.preference.Preference

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.