MultiSelectListPreference

public class MultiSelectListPreference
extends DialogPreference

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


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

This preference saves a set of strings. This set will contain one or more mValues from the setEntryValues(CharSequence[]) array.

Summary

Inherited constants

Public constructors

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

Public methods

int findIndexOfValue(String value)

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

CharSequence[] getEntries()

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

CharSequence[] getEntryValues()

Returns the array of mValues to be saved for the preference.

Set<String> getValues()

Retrieves the current values of the key.

void setEntries(CharSequence[] entries)

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