added in version 24.1.0
belongs to Maven artifact


public class PreferenceCategory
extends PreferenceGroup


Used to group Preference objects and provide a disabled title above the group.

Developer Guides

For information about building a settings UI with Preferences, read the Settings guide.


Inherited XML attributes

From class
From class

Inherited constants

From class

Public constructors

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

Public methods

boolean isEnabled()

Checks whether this Preference should be enabled in the list.

void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfoCompat info)

Initializes an AccessibilityNodeInfo with information about the View for this Preference.

boolean shouldDisableDependents()

Checks whether this preference's dependents should currently be disabled.

Protected methods

boolean onPrepareAddPreference(Preference preference)

Prepares a Preference to be added to the group.

Inherited methods

From class