belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1
PreferenceGroup
public
abstract
class
PreferenceGroup
extends Preference
java.lang.Object | ||
↳ | android.support.v7.preference.Preference | |
↳ | android.support.v7.preference.PreferenceGroup |
![]() |
A container for multiple
Preference
objects. It is a base class for Preference objects that are
parents, such as PreferenceCategory
and PreferenceScreen
.
Developer Guides
For information about building a settings UI with Preferences, read the Settings guide.
Summary
Nested classes | |
---|---|
interface |
PreferenceGroup.PreferencePositionCallback
Interface for PreferenceGroup Adapters to implement so that
|
XML attributes | |
---|---|
PreferenceGroup_initialExpandedChildrenCount |
Inherited XML attributes | |
---|---|
![]()
android.support.v7.preference.Preference
|
Inherited constants |
---|
![]()
android.support.v7.preference.Preference
|
Public constructors | |
---|---|
PreferenceGroup(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
|
|
PreferenceGroup(Context context, AttributeSet attrs, int defStyleAttr)
|
|
PreferenceGroup(Context context, AttributeSet attrs)
|
Public methods | |
---|---|
void
|
addItemFromInflater(Preference preference)
Called by the inflater to add an item to this group. |
boolean
|
addPreference(Preference preference)
Adds a |
Preference
|
findPreference(CharSequence key)
Finds a |
int
|
getInitialExpandedChildrenCount()
Gets the maximal number of children that is initially shown. |
Preference
|
getPreference(int index)
Returns the |
int
|
getPreferenceCount()
Returns the number of children |
boolean
|
isOrderingAsAdded()
Whether this group is ordering preferences in the order they are added. |
void
|
notifyDependencyChange(boolean disableDependents)
Notifies any listening dependents of a change that affects the dependency. |
void
|
onAttached()
Called when the Preference hierarchy has been attached to the list of preferences. |
void
|
onDetached()
Called when the Preference hierarchy has been detached from the list of preferences. |
void
|
removeAll()
Removes all |
boolean
|
removePreference(Preference preference)
Removes a |
void
|
setInitialExpandedChildrenCount(int expandedCount)
Sets the maximal number of children that are shown when the preference group is launched where the rest of the children will be hidden. |
void
|
setOrderingAsAdded(boolean orderingAsAdded)
Whether to order the |
Protected methods | |
---|---|
void
|
dispatchRestoreInstanceState(Bundle container)
Called by |
void
|
dispatchSaveInstanceState(Bundle container)
Called by |
boolean
|
isOnSameScreenAsChildren()
Whether this preference group should be shown on the same screen as its contained preferences. |
boolean
|
onPrepareAddPreference(Preference preference)
Prepares a |
void
|
onRestoreInstanceState(Parcelable state)
Hook allowing a Preference to re-apply a representation of its internal
state that had previously been generated by |
Parcelable
|
onSaveInstanceState()
Hook allowing a Preference to generate a representation of its internal state that can later be used to create a new instance with that same state. |
Inherited methods | |
---|---|
![]()
android.support.v7.preference.Preference
|