FileDocCategorySizeDatePackage
PreferenceCategory.javaAPI DocAndroid 5.1 API2269Thu Mar 12 22:22:10 GMT 2015android.preference

PreferenceCategory

public 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 booleanisEnabled()

        return false;
    
protected booleanonPrepareAddPreference(Preference preference)

        if (preference instanceof PreferenceCategory) {
            throw new IllegalArgumentException(
                    "Cannot add a " + TAG + " directly to a " + TAG);
        }
        
        return super.onPrepareAddPreference(preference);
    
public booleanshouldDisableDependents()

        return !super.isEnabled();