PreferenceGroup

public abstract class PreferenceGroup
extends Preference

java.lang.Object
   ↳ androidx.preference.Preference
     ↳ androidx.preference.PreferenceGroup


A container for multiple Preferences. It is a base class for preference objects that are parents, such as PreferenceCategory and PreferenceScreen.

Developer Guides

For information about building a settings screen using the AndroidX Preference library, see Settings.

Summary

Nested classes

interface PreferenceGroup.PreferencePositionCallback

Interface for PreferenceGroup adapters to implement so that PreferenceFragmentCompat.scrollToPreference(String) and PreferenceFragmentCompat.scrollToPreference(Preference) can determine the correct scroll position to request. 

Inherited constants

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 at the correct position based on the preference's order.

<T extends P