Java android.preference ListPreference fields, constructors, methods, implement or subclass

Example usage for Java android.preference ListPreference fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.preference ListPreference.

The text is from its open source code.

Subclass

android.preference.ListPreference has subclasses.
Click this link to see all its subclasses.

Constructor

Method

intfindIndexOfValue(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.
CharSequencegetEntry()
Returns the entry corresponding to the current value.
CharSequence[]getEntryValues()
Returns the array of values to be saved for the preference.
CharSequencegetSummary()
Returns the summary of this ListPreference.
StringgetValue()
Returns the value of the key.
voidsetDefaultValue(Object defaultValue)
Sets the default value for this Preference, which will be set either if persistence is off or persistence is on and the preference is not found in the persistent storage.
voidsetDialogTitle(CharSequence dialogTitle)
Sets the title of the dialog.
voidsetEnabled(boolean enabled)
Sets whether this Preference is enabled.
voidsetEntries(CharSequence[] entries)
Sets the human-readable entries to be shown in the list.
voidsetEntries(@ArrayRes int entriesResId)
voidsetEntryValues(CharSequence[] entryValues)
The array to find the value to save for a preference when an entry from entries is selected.
voidsetEntryValues(@ArrayRes int entryValuesResId)
voidsetKey(String key)
Sets the key for this Preference, which is used as a key to the SharedPreferences or PreferenceDataStore .
voidsetOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener)
Sets the callback to be invoked when this Preference is changed by the user (but before the internal state has been updated).
voidsetShouldDisableView(boolean shouldDisableView)
Sets whether this Preference should disable its view when it gets disabled.
voidsetSummary(CharSequence summary)
Sets the summary for this Preference with a CharSequence.
voidsetTitle(CharSequence title)
Sets the title for this Preference with a CharSequence.
voidsetValue(String value)
Sets the value of the key.
voidsetValueIndex(int index)
Sets the value to the given index from the entry values.