PreferenceCategorypublic class PreferenceCategory extends PreferenceGroup Used to group {@link 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.
|
Fields Summary |
---|
private static final String | TAG |
Constructors Summary |
---|
public PreferenceCategory(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
super(context, attrs, defStyleAttr, defStyleRes);
| public PreferenceCategory(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
this(context, attrs, defStyleAttr, 0);
| public PreferenceCategory(android.content.Context context, android.util.AttributeSet attrs)
this(context, attrs, com.android.internal.R.attr.preferenceCategoryStyle);
| public PreferenceCategory(android.content.Context context)
this(context, null);
|
Methods Summary |
---|
public boolean | isEnabled()
return false;
| protected boolean | onPrepareAddPreference(Preference preference)
if (preference instanceof PreferenceCategory) {
throw new IllegalArgumentException(
"Cannot add a " + TAG + " directly to a " + TAG);
}
return super.onPrepareAddPreference(preference);
| public boolean | shouldDisableDependents()
return !super.isEnabled();
|
|