# 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

|---|---|
| `https://developer.android.com/reference/androidx/preference/DialogPreference.TargetFragment` | Interface for `https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat`s to implement to allow `https://developer.android.com/reference/androidx/preference/DialogPreference`s to find the preference that launched the dialog. |
| `https://developer.android.com/reference/androidx/preference/EditTextPreference.OnBindEditTextListener` | Interface definition for a callback to be invoked when the corresponding dialog view for this preference is bound. |
| `https://developer.android.com/reference/androidx/preference/Preference.OnPreferenceChangeListener` | Interface definition for a callback to be invoked when the value of this `https://developer.android.com/reference/androidx/preference/Preference` has been changed by the user and is about to be set and/or persisted. |
| `https://developer.android.com/reference/androidx/preference/Preference.OnPreferenceClickListener` | Interface definition for a callback to be invoked when a `https://developer.android.com/reference/androidx/preference/Preference` is clicked. |
| `https://developer.android.com/reference/androidx/preference/Preference.SummaryProvider` | Interface definition for a callback to be invoked when the summary of this `https://developer.android.com/reference/androidx/preference/Preference` is requested (typically when this preference is added to the hierarchy or its value is updated). |
| `https://developer.android.com/reference/androidx/preference/PreferenceFragment.OnPreferenceDisplayDialogCallback` | **This interface is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/androidx/preference/PreferenceFragment.OnPreferenceStartFragmentCallback` | **This interface is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/androidx/preference/PreferenceFragment.OnPreferenceStartScreenCallback` | **This interface is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback` | Interface that the fragment's containing activity should implement to be able to process preference items that wish to display a dialog. |
| `https://developer.android.com/reference/androidx/preference/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. |
| `https://developer.android.com/reference/androidx/preference/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. |
| `https://developer.android.com/reference/androidx/preference/PreferenceGroup.PreferencePositionCallback` | Interface for PreferenceGroup adapters to implement so that `https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat#scrollToPreference(java.lang.String)` and `https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat#scrollToPreference(androidx.preference.Preference)` can determine the correct scroll position to request. |
| `https://developer.android.com/reference/androidx/preference/PreferenceManager.OnDisplayPreferenceDialogListener` | Interface definition for a class that will be called when a `https://developer.android.com/reference/androidx/preference/Preference` requests to display a dialog. |
| `https://developer.android.com/reference/androidx/preference/PreferenceManager.OnNavigateToScreenListener` | Interface definition for a class that will be called when a `https://developer.android.com/reference/androidx/preference/PreferenceScreen` requests navigation. |
| `https://developer.android.com/reference/androidx/preference/PreferenceManager.OnPreferenceTreeClickListener` | Interface definition for a callback to be invoked when a `https://developer.android.com/reference/androidx/preference/Preference` in the hierarchy rooted at this `https://developer.android.com/reference/androidx/preference/PreferenceScreen` is clicked. |

## Classes

|---|---|
| `https://developer.android.com/reference/androidx/preference/CheckBoxPreference` | A `https://developer.android.com/reference/androidx/preference/Preference` that provides checkbox widget functionality. |
| `https://developer.android.com/reference/androidx/preference/DialogPreference` | A base class for `https://developer.android.com/reference/androidx/preference/Preference`s that are dialog-based. |
| `https://developer.android.com/reference/androidx/preference/DropDownPreference` | A `https://developer.android.com/reference/androidx/preference/ListPreference` that presents the options in a drop down menu rather than a dialog. |
| `https://developer.android.com/reference/androidx/preference/EditTextPreference` | A `https://developer.android.com/reference/androidx/preference/DialogPreference` that shows a `https://developer.android.com/reference/android/widget/EditText.html` in the dialog. |
| `https://developer.android.com/reference/androidx/preference/EditTextPreference.SimpleSummaryProvider` | A simple `https://developer.android.com/reference/androidx/preference/Preference.SummaryProvider` implementation for an `https://developer.android.com/reference/androidx/preference/EditTextPreference`. |
| `https://developer.android.com/reference/androidx/preference/EditTextPreferenceDialogFragment` | **This class is deprecated.** Use `https://developer.android.com/reference/androidx/preference/EditTextPreferenceDialogFragmentCompat` instead <br /> |
| `https://developer.android.com/reference/androidx/preference/EditTextPreferenceDialogFragmentCompat` |   |
| `https://developer.android.com/reference/androidx/preference/ListPreference` | A `https://developer.android.com/reference/androidx/preference/Preference` that displays a list of entries as a dialog. |
| `https://developer.android.com/reference/androidx/preference/ListPreference.SimpleSummaryProvider` | A simple `https://developer.android.com/reference/androidx/preference/Preference.SummaryProvider` implementation for a `https://developer.android.com/reference/androidx/preference/ListPreference`. |
| `https://developer.android.com/reference/androidx/preference/ListPreferenceDialogFragment` | **This class is deprecated.** Use `https://developer.android.com/reference/androidx/preference/ListPreferenceDialogFragmentCompat` instead <br /> |
| `https://developer.android.com/reference/androidx/preference/ListPreferenceDialogFragmentCompat` |   |
| `https://developer.android.com/reference/androidx/preference/MultiSelectListPreference` | A `https://developer.android.com/reference/androidx/preference/Preference` that displays a list of entries as a dialog. |
| `https://developer.android.com/reference/androidx/preference/MultiSelectListPreferenceDialogFragment` | **This class is deprecated.** Use `https://developer.android.com/reference/androidx/preference/MultiSelectListPreferenceDialogFragmentCompat` instead <br /> |
| `https://developer.android.com/reference/androidx/preference/MultiSelectListPreferenceDialogFragmentCompat` |   |
| `https://developer.android.com/reference/androidx/preference/Preference` | The basic building block that represents an individual setting displayed to a user in the preference hierarchy. |
| `https://developer.android.com/reference/androidx/preference/Preference.BaseSavedState` | A base class for managing the instance state of a `https://developer.android.com/reference/androidx/preference/Preference`. |
| `https://developer.android.com/reference/androidx/preference/PreferenceCategory` | A container that is used to group similar `https://developer.android.com/reference/androidx/preference/Preference`s. |
| `https://developer.android.com/reference/androidx/preference/PreferenceDataStore` | A data store interface to be implemented and provided to the `https://developer.android.com/reference/androidx/preference/Preference` framework. |
| `https://developer.android.com/reference/androidx/preference/PreferenceDialogFragment` | **This class is deprecated.** Use `https://developer.android.com/reference/androidx/preference/PreferenceDialogFragmentCompat` instead <br /> |
| `https://developer.android.com/reference/androidx/preference/PreferenceDialogFragmentCompat` | Abstract base class which presents a dialog associated with a `https://developer.android.com/reference/androidx/preference/DialogPreference`. |
| `https://developer.android.com/reference/androidx/preference/PreferenceFragment` | **This class is deprecated.** Use `https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat` instead <br /> |
| `https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat` | A PreferenceFragmentCompat is the entry point to using the Preference library. |
| `https://developer.android.com/reference/androidx/preference/PreferenceGroup` | A container for multiple `https://developer.android.com/reference/androidx/preference/Preference`s. |
| `https://developer.android.com/reference/androidx/preference/PreferenceGroupKt` |   |
| `https://developer.android.com/reference/androidx/preference/PreferenceHeaderFragmentCompat` | `https://developer.android.com/reference/androidx/preference/PreferenceHeaderFragmentCompat` implements a two-pane fragment for preferences. |
| `https://developer.android.com/reference/androidx/preference/PreferenceManager` | Used to help create `https://developer.android.com/reference/androidx/preference/Preference` hierarchies from activities or XML. |
| `https://developer.android.com/reference/androidx/preference/PreferenceManager.PreferenceComparisonCallback` | Callback class to be used by the `https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.Adapter` associated with the `https://developer.android.com/reference/androidx/preference/PreferenceScreen`, used to determine when two `https://developer.android.com/reference/androidx/preference/Preference` objects are semantically and visually the same. |
| `https://developer.android.com/reference/androidx/preference/PreferenceManager.SimplePreferenceComparisonCallback` | A basic implementation of `https://developer.android.com/reference/androidx/preference/PreferenceManager.PreferenceComparisonCallback` suitable for use with the default `https://developer.android.com/reference/androidx/preference/Preference` classes. |
| `https://developer.android.com/reference/androidx/preference/PreferenceScreen` | A top-level container that represents a settings screen. |
| `https://developer.android.com/reference/androidx/preference/PreferenceViewHolder` | A `https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.ViewHolder` class which caches views associated with the default `https://developer.android.com/reference/androidx/preference/Preference` layouts. |
| `https://developer.android.com/reference/androidx/preference/R` |   |
| `https://developer.android.com/reference/androidx/preference/R.attr` |   |
| `https://developer.android.com/reference/androidx/preference/R.style` |   |
| `https://developer.android.com/reference/androidx/preference/SeekBarPreference` | Preference based on android.preference.SeekBarPreference but uses support preference as a base . |
| `https://developer.android.com/reference/androidx/preference/SwitchPreference` | A `https://developer.android.com/reference/androidx/preference/Preference` that provides a two-state toggleable option. |
| `https://developer.android.com/reference/androidx/preference/SwitchPreferenceCompat` | A `https://developer.android.com/reference/androidx/preference/Preference` that provides a two-state toggleable option. |
| `https://developer.android.com/reference/androidx/preference/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. |