public class

PreferenceCategory

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

Class Overview

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

Summary

[Expand]
Inherited XML Attributes
From class android.preference.PreferenceGroup
From class android.preference.Preference
[Expand]
Inherited Constants
From class android.preference.Preference
Public Constructors
PreferenceCategory(Context context, AttributeSet attrs, int defStyle)
PreferenceCategory(Context context, AttributeSet attrs)
PreferenceCategory(Context context)
Public Methods
boolean isEnabled()
Checks whether this Preference should be enabled in the list.
Protected Methods
boolean onPrepareAddPreference(Preference preference)
Prepares a Preference to be added to the group.
[Expand]
Inherited Methods
From class android.preference.PreferenceGroup
From class android.preference.Preference
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

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

Since: API Level 1

public PreferenceCategory (Context context, AttributeSet attrs)

Since: API Level 1

public PreferenceCategory (Context context)

Since: API Level 1

Public Methods

public boolean isEnabled ()

Since: API Level 1

Checks whether this Preference should be enabled in the list.

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

Protected Methods

protected boolean onPrepareAddPreference (Preference preference)

Since: API Level 1

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).