androidx.preference


The Preference library allows you to build interactive settings screens, without needing to handle interacting with device storage or managing the user interface.

Interfaces

DialogPreference.TargetFragment

Interface for PreferenceFragmentCompats to implement to allow DialogPreferences to find the preference that launched the dialog.

EditTextPreference.OnBindEditTextListener

Interface definition for a callback to be invoked when the corresponding dialog view for this preference is bound.

Preference.OnPreferenceChangeListener

Interface definition for a callback to be invoked when the value of this Preference has been changed by the user and is about to be set and/or persisted.

Preference.OnPreferenceClickListener

Interface definition for a callback to be invoked when a Preference is clicked.

Preference.SummaryProvider

Interface definition for a callback to be invoked when the summary of this Preference is requested (typically when this preference is added to the hierarchy or its value is updated).

PreferenceFragment.OnPreferenceDisplayDialogCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to display a dialog.

PreferenceFragment.OnPreferenceStartFragmentCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a specified fragment.

PreferenceFragment.OnPreferenceStartScreenCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a new screen of preferences.

PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to display a dialog.

PreferenceFragmentCompat.OnPreferenceStartFragmentCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a specified fragment.

PreferenceFragmentCompat.OnPreferenceStartScreenCallback

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a new screen of preferences.

PreferenceGroup.PreferencePositionCallback

Interface for PreferenceGroup adapters to implement so that scrollToPreference and scrollToPreference can determine the correct scroll position to request.

PreferenceManager.OnDisplayPreferenceDialogListener

Interface definition for a class that will be called when a Preference requests to display a dialog.

PreferenceManager.OnNavigateToScreenListener

Interface definition for a class that will be called when a PreferenceScreen requests navigation.

PreferenceManager.OnPreferenceTreeClickListener

Interface definition for a callback to be invoked when a Preference in the hierarchy rooted at this PreferenceScreen is clicked.

Classes

CheckBoxPreference

A Preference that provides checkbox widget functionality.

DialogPreference

A base class for Preferences that are dialog-based.

DropDownPreference

A ListPreference that presents the options in a drop down menu rather than a dialog.

EditTextPreference

A DialogPreference that shows a EditText in the dialog.

EditTextPreference.SimpleSummaryProvider

A simple androidx.preference.Preference.SummaryProvider implementation for an EditTextPreference.

EditTextPreferenceDialogFragment

This class is deprecated.

Use EditTextPreferenceDialogFragmentCompat instead

EditTextPreferenceDialogFragmentCompat
ListPreference

A Preference that displays a list of entries as a dialog.

ListPreference.SimpleSummaryProvider

A simple androidx.preference.Preference.SummaryProvider implementation for a ListPreference.

ListPreferenceDialogFragment

This class is deprecated.

Use ListPreferenceDialogFragmentCompat instead

ListPreferenceDialogFragmentCompat
MultiSelectListPreference

A Preference that displays a list of entries as a dialog.

MultiSelectListPreferenceDialogFragment

This class is deprecated.

Use MultiSelectListPreferenceDialogFragmentCompat instead

MultiSelectListPreferenceDialogFragmentCompat
Preference

The basic building block that represents an individual setting displayed to a user in the preference hierarchy.

Preference.BaseSavedState

A base class for managing the instance state of a Preference.

PreferenceCategory

A container that is used to group similar Preferences.

PreferenceDataStore

A data store interface to be implemented and provided to the Preference framework.

PreferenceDialogFragment

This class is deprecated.

Use PreferenceDialogFragmentCompat instead

PreferenceDialogFragmentCompat

Abstract base class which presents a dialog associated with a DialogPreference.

PreferenceFragment

This class is deprecated.

Use PreferenceFragmentCompat instead

PreferenceFragmentCompat

A PreferenceFragmentCompat is the entry point to using the Preference library.

PreferenceGroup

A container for multiple Preferences.

PreferenceGroupKt
PreferenceHeaderFragmentCompat

PreferenceHeaderFragmentCompat implements a two-pane fragment for preferences.

PreferenceManager

Used to help create Preference hierarchies from activities or XML.

PreferenceManager.PreferenceComparisonCallback

Callback class to be used by the androidx.recyclerview.widget.RecyclerView.Adapter associated with the PreferenceScreen, used to determine when two Preference objects are semantically and visually the same.

PreferenceManager.SimplePreferenceComparisonCallback

A basic implementation of PreferenceComparisonCallback suitable for use with the default Preference classes.

PreferenceScreen

A top-level container that represents a settings screen.

PreferenceViewHolder

A RecyclerView.ViewHolder class which caches views associated with the default Preference layouts.

SeekBarPreference

Preference based on android.preference.SeekBarPreference but uses support preference as a base .

SwitchPreference

A Preference that provides a two-state toggleable option.

SwitchPreferenceCompat

A Preference that provides a two-state toggleable option.

TwoStatePreference

Common base class for preferences that have two selectable states, save a boolean value, and may have dependent preferences that are enabled/disabled based on the current state.