Google 致力于为黑人社区推动种族平等。查看具体举措

MultiSelectListPreference

open class MultiSelectListPreference : DialogPreference
kotlin.Any
   ↳ 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
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!)

Public methods
open Int

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

open Array<CharSequence!>!

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

open Array<CharSequence!>!

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

open MutableSet<String!>!

Retrieves the current values of the key.

open Unit

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

open Unit
setEntries(@ArrayRes entriesResId: Int)

open Unit

The array to find the value to save for a preference when an entry from entries is selected.

open Unit
setEntryValues(@ArrayRes entryValuesResId: Int)

open Unit

Sets the values for the key.

Protected methods
open BooleanArray!

open Any!

open Unit

open Parcelable!

open Unit
onSetInitialValue(defaultValue: Any?)

Inherited functions