public class PreferenceCategory
extends PreferenceGroup

   ↳ androidx.preference.Preference
     ↳ androidx.preference.PreferenceGroup
       ↳ androidx.preference.PreferenceCategory

A container that is used to group similar Preferences. A PreferenceCategory displays a category title and visually separates groups of Preferences.

Developer Guides

For information about building a settings screen using the AndroidX Preference library, see Settings.


Inherited constants

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 onBindViewHolder(PreferenceViewHolder holder)

Binds the created View to the data for this preference.

boolean shouldDisableDependents()

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

Inherited methods