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 array.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)
constructor(@NonNull context: Context)

Functions

Link copied to clipboard
open fun findIndexOfValue(value: String): Int
Returns the index of the given value (in the entry mValues array).
Link copied to clipboard
The list of entries to be shown in the list in subsequent dialogs.
Link copied to clipboard
Returns the array of mValues to be saved for the preference.
Link copied to clipboard
open fun getValues(): Set<String>
Retrieves the current values of the key.
Link copied to clipboard
open fun setEntries(@ArrayRes entriesResId: Int)

open fun setEntries(entries: Array<CharSequence>)
Sets the human-readable entries to be shown in the list.
Link copied to clipboard
open fun setEntryValues(@ArrayRes entryValuesResId: Int)

open fun setEntryValues(entryValues: Array<CharSequence>)
The array to find the value to save for a preference when an entry from entries is selected.
Link copied to clipboard
open fun setValues(values: Set<String>)
Sets the values for the key.