Android APIs
public class

PreferenceCategory

extends PreferenceGroup
java.lang.Object
   ↳ android.support.v7.preference.Preference
     ↳ android.support.v7.preference.PreferenceGroup
       ↳ android.support.v7.preference.PreferenceCategory

Class Overview

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.

Summary

[Expand]
Inherited XML Attributes
From class android.support.v7.preference.PreferenceGroup
From class android.support.v7.preference.Preference
[Expand]
Inherited Constants
From class android.support.v7.preference.Preference
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.
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.
[Expand]
Inherited Methods
From class android.support.v7.preference.PreferenceGroup
From class android.support.v7.preference.Preference
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

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

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

public PreferenceCategory (Context context, AttributeSet attrs)

public PreferenceCategory (Context context)

Public Methods

public boolean isEnabled ()

Checks whether this Preference should be enabled in the list.

Returns
  • True if this Preference is enabled, false otherwise.

public boolean shouldDisableDependents ()

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

Returns
  • True if the dependents should be disabled, otherwise false.

Protected Methods

protected boolean onPrepareAddPreference (Preference preference)

Prepares a Preference to be added to the group.

Parameters
preference The preference to add.
Returns
  • Whether to allow adding the preference (true), or not (false).