O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

androidx.preference

Interfaces

TargetFragment

Interface for PreferenceFragmentCompats to implement to allow DialogPreferences to find the preference that launched the dialog.

OnBindEditTextListener

Interface definition for a callback to be invoked when the corresponding dialog view for this preference is bound.

OnPreferenceChangeListener

Interface definition for a callback to be invoked when the value of this Preference has been changed by the user and is about to be set and/or persisted.

OnPreferenceClickListener

Interface definition for a callback to be invoked when a Preference is clicked.

SummaryProvider

Interface definition for a callback to be invoked when the summary of this Preference is requested (typically when this preference is added to the hierarchy or its value is updated).

OnPreferenceDisplayDialogCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to display a dialog.

OnPreferenceStartFragmentCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a specified fragment.

OnPreferenceStartScreenCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a new screen of preferences.

OnPreferenceDisplayDialogCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to display a dialog.

OnPreferenceStartFragmentCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a specified fragment.

OnPreferenceStartScreenCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a new screen of preferences.

PreferencePositionCallback

Interface for PreferenceGroup adapters to implement so that PreferenceFragmentCompat#scrollToPreference(String) and PreferenceFragmentCompat#scrollToPreference(Preference) can determine the correct scroll position to request.

OnDisplayPreferenceDialogListener

Interface definition for a class that will be called when a Preference requests to display a dialog.

OnNavigateToScreenListener

Interface definition for a class that will be called when a PreferenceScreen requests navigation.

OnPreferenceTreeClickListener

Interface definition for a callback to be invoked when a Preference in the hierarchy rooted at this PreferenceScreen is clicked.

Classes

CheckBoxPreference

A Preference that provides checkbox widget functionality.

DialogPreference

A base class for Preferences that are dialog-based.

DropDownPreference

A ListPreference that presents the options in a drop down menu rather than a dialog.

EditTextPreference

A DialogPreference that shows a EditText in the dialog.

EditTextPreferenceDialogFragment

EditTextPreferenceDialogFragmentCompat

ListPreference

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

ListPreferenceDialogFragment

ListPreferenceDialogFragmentCompat

MultiSelectListPreference

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

MultiSelectListPreferenceDialogFragment

MultiSelectListPreferenceDialogFragmentCompat

Preference

The basic building block that represents an individual setting displayed to a user in the preference hierarchy.

PreferenceCategory

A container that is used to group similar Preferences.

PreferenceDataStore

A data store interface to be implemented and provided to the Preference framework.

PreferenceDialogFragment

Abstract base class which presents a dialog associated with a DialogPreference.

PreferenceDialogFragmentCompat

Abstract base class which presents a dialog associated with a DialogPreference.

PreferenceFragment

Shows a hierarchy of Preference objects as lists.

PreferenceFragmentCompat

A PreferenceFragmentCompat is the entry point to using the Preference library.

PreferenceGroup

A container for multiple Preferences.

PreferenceManager

Used to help create Preference hierarchies from activities or XML.

PreferenceScreen

A top-level container that represents a settings screen.

PreferenceViewHolder

A RecyclerView.ViewHolder class which caches views associated with the default Preference layouts.

SeekBarPreference

Preference based on android.

SwitchPreference

A Preference that provides a two-state toggleable option.

SwitchPreferenceCompat

A Preference that provides a two-state toggleable option.

TwoStatePreference

Common base class for preferences that have two selectable states, save a boolean value, and may have dependent preferences that are enabled/disabled based on the current state.

Extension functions summary

For PreferenceGroup
operator Boolean

Returns true if preference is found in this preference group.

Unit
PreferenceGroup.forEach(action: (preference: Preference) -> Unit)

Performs the given action on each preference in this preference group.

Unit
PreferenceGroup.forEachIndexed(action: (index: Int, preference: Preference) -> Unit)

Performs the given action on each preference in this preference group, providing its sequential index.

operator T?

Returns the preference with key, or null if no preference with key is found.

operator Preference

Returns the preference at index.

Boolean

Returns true if this preference group contains no preferences.

Boolean

Returns true if this preference group contains one or more preferences.

operator MutableIterator<Preference>

Returns a MutableIterator over the preferences in this preference group.

operator Unit

Removes preference from this preference group.

operator Unit

Adds preference to this preference group.

Extension properties summary

For PreferenceGroup
Sequence<Preference>

Returns a Sequence over the preferences in this preference group.

Int

Returns the number of preferences in this preference group.

Extension functions

contains

operator fun PreferenceGroup.contains(preference: Preference): Boolean

Returns true if preference is found in this preference group.

forEach

inline fun PreferenceGroup.forEach(action: (preference: Preference) -> Unit): Unit

Performs the given action on each preference in this preference group.

forEachIndexed

inline fun PreferenceGroup.forEachIndexed(action: (index: Int, preference: Preference) -> Unit): Unit

Performs the given action on each preference in this preference group, providing its sequential index.

get

inline operator fun <T : Preference> PreferenceGroup.get(key: CharSequence): T?

Returns the preference with key, or null if no preference with key is found.

get

operator fun PreferenceGroup.get(index: Int): Preference

Returns the preference at index.

Exceptions
IndexOutOfBoundsException if index is less than 0 or greater than or equal to the count.

isEmpty

inline fun PreferenceGroup.isEmpty(): Boolean

Returns true if this preference group contains no preferences.

isNotEmpty

inline fun PreferenceGroup.isNotEmpty(): Boolean

Returns true if this preference group contains one or more preferences.

iterator

operator fun PreferenceGroup.iterator(): MutableIterator<Preference>

Returns a MutableIterator over the preferences in this preference group.

minusAssign

inline operator fun PreferenceGroup.minusAssign(preference: Preference): Unit

Removes preference from this preference group.

plusAssign

inline operator fun PreferenceGroup.plusAssign(preference: Preference): Unit

Adds preference to this preference group.

Extension properties

children

val PreferenceGroup.children: Sequence<Preference>

Returns a Sequence over the preferences in this preference group.

size

inline val PreferenceGroup.size: Int

Returns the number of preferences in this preference group.