PreferenceGroup

A container for multiple Preferences. It is a base class for preference objects that are parents, such as PreferenceCategory and PreferenceScreen.

Inheritors

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)

Types

Link copied to clipboard
Definition for a callback to be invoked when the expand button is clicked.
Link copied to clipboard
Interface for PreferenceGroup adapters to implement so that scrollToPreference and scrollToPreference can determine the correct scroll position to request.

Functions

Link copied to clipboard
open fun addItemFromInflater(@NonNull preference: Preference)
Called by the inflater to add an item to this group.
Link copied to clipboard
open fun addPreference(@NonNull preference: Preference): Boolean
Adds a Preference at the correct position based on the preference's order.
Link copied to clipboard
Finds a Preference based on its key.
Link copied to clipboard
Gets the maximal number of children that are initially shown.
Link copied to clipboard
Returns the callback to be invoked when the expand button is clicked.
Link copied to clipboard
Returns the Preference at a particular index.
Link copied to clipboard
Returns the number of children Preferences.
Link copied to clipboard
open fun isAttached(): Boolean
Returns true if we're between onAttached and onPrepareForRemoval
Link copied to clipboard
Whether this group is ordering preferences in the order they are added.
Link copied to clipboard
open fun notifyDependencyChange(disableDependents: Boolean)
Notifies any listening dependents of a change that affects the dependency.
Link copied to clipboard
open fun onAttached()
Called when the preference hierarchy has been attached to the list of preferences.
Link copied to clipboard
open fun onDetached()
Called when the preference hierarchy has been detached from the list of preferences.
Link copied to clipboard
open fun removeAll()
Removes all Preferences from this group.
Link copied to clipboard
open fun removePreference(@NonNull preference: Preference): Boolean
Removes a Preference from this group.
Link copied to clipboard
Recursively finds and removes a Preference from this group or a nested group lower down in the hierarchy.
Link copied to clipboard
open fun setInitialExpandedChildrenCount(expandedCount: Int)
Sets the maximal number of children that are shown when the preference group is launched where the rest of the children will be hidden.
Link copied to clipboard
Sets the callback to be invoked when the expand button is clicked.
Link copied to clipboard
open fun setOrderingAsAdded(orderingAsAdded: Boolean)
Whether to order the Preference children of this group as they are added.