ListPreference

public class ListPreference
extends DialogPreference

java.lang.Object
   ↳ androidx.preference.Preference
     ↳ androidx.preference.DialogPreference
       ↳ androidx.preference.ListPreference


A Preference that displays a list of entries as a dialog.

This preference saves a string value. This string will be the value from the setEntryValues(CharSequence[]) array.

Summary

Nested classes

class ListPreference.SimpleSummaryProvider

A simple Preference.SummaryProvider implementation for a ListPreference

Inherited constants

Public constructors

ListPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
ListPreference(Context context, AttributeSet attrs, int defStyleAttr)
ListPreference(Context context, AttributeSet attrs)
ListPreference(Context context)

Public methods

int findIndexOfValue(String value)

Returns the index of the given value (in the entry values array).

CharSequence[] getEntries()

The list of entries to be shown in the list in subsequent dialogs.

CharSequence getEntry()

Returns the entry corresponding to the current value. </