Most visited

Recently visited

PreferenceCategory

public class PreferenceCategory
extends PreferenceGroup

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


用于对 Preference对象进行分组,并在组上方提供禁用的标题。

Developer Guides

有关使用首选项构建设置UI的信息,请阅读 Settings指南。

Summary

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

检查此首选项是否应在列表中启用。

void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfoCompat info)

使用有关此首选项的视图的信息初始化 AccessibilityNodeInfo

boolean shouldDisableDependents()

检查当前是否应该禁用此首选项的依赖项。

Protected methods

boolean onPrepareAddPreference(Preference preference)

准备将 Preference添加到组中。

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

PreferenceCategory

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

Parameters
context Context
attrs AttributeSet
defStyleAttr int
defStyleRes int

PreferenceCategory

PreferenceCategory (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context
attrs AttributeSet
defStyleAttr int

PreferenceCategory

PreferenceCategory (Context context, 
                AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

PreferenceCategory

PreferenceCategory (Context context)

Parameters
context Context

Public methods

isEnabled

boolean isEnabled ()

检查此首选项是否应在列表中启用。

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

onInitializeAccessibilityNodeInfo

void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfoCompat info)

使用有关此首选项的视图的信息初始化 AccessibilityNodeInfo

Parameters
info AccessibilityNodeInfoCompat

shouldDisableDependents

boolean shouldDisableDependents ()

检查当前是否应该禁用此首选项的依赖项。

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

Protected methods

onPrepareAddPreference

boolean onPrepareAddPreference (Preference preference)

准备将 Preference添加到组中。

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

Hooray!