Stay organized with collections
Save and categorize content based on your preferences.
android.preference
Interfaces
Classes
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# android.preference\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/preference/package-summary \"View this page in Java\")\n\nInterfaces\n----------\n\n|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [OnPreferenceChangeListener](/reference/kotlin/android/preference/Preference.OnPreferenceChangeListener) | Interface definition for a callback to be invoked when the value of this [Preference](/reference/kotlin/android/preference/Preference) has been changed by the user and is about to be set and/or persisted. |\n| [OnPreferenceClickListener](/reference/kotlin/android/preference/Preference.OnPreferenceClickListener) | Interface definition for a callback to be invoked when a [Preference](/reference/kotlin/android/preference/Preference) is clicked. |\n| [PreferenceDataStore](/reference/kotlin/android/preference/PreferenceDataStore) | A data store interface to be implemented and provided to the Preferences framework. |\n| [OnPreferenceStartFragmentCallback](/reference/kotlin/android/preference/PreferenceFragment.OnPreferenceStartFragmentCallback) | Interface that PreferenceFragment's containing activity should implement to be able to process preference items that wish to switch to a new fragment. |\n| [OnActivityDestroyListener](/reference/kotlin/android/preference/PreferenceManager.OnActivityDestroyListener) | Interface definition for a class that will be called when the container's activity is destroyed. |\n| [OnActivityResultListener](/reference/kotlin/android/preference/PreferenceManager.OnActivityResultListener) | Interface definition for a class that will be called when the container's activity receives an activity result. |\n| [OnActivityStopListener](/reference/kotlin/android/preference/PreferenceManager.OnActivityStopListener) | Interface definition for a class that will be called when the container's activity is stopped. |\n\nClasses\n-------\n\n|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CheckBoxPreference](/reference/kotlin/android/preference/CheckBoxPreference) | A [Preference](/reference/kotlin/android/preference/Preference) that provides checkbox widget functionality. |\n| [DialogPreference](/reference/kotlin/android/preference/DialogPreference) | A base class for [Preference](/reference/kotlin/android/preference/Preference) objects that are dialog-based. |\n| [EditTextPreference](/reference/kotlin/android/preference/EditTextPreference) | A [Preference](/reference/kotlin/android/preference/Preference) that allows for string input. |\n| [ListPreference](/reference/kotlin/android/preference/ListPreference) | A [Preference](/reference/kotlin/android/preference/Preference) that displays a list of entries as a dialog. |\n| [MultiSelectListPreference](/reference/kotlin/android/preference/MultiSelectListPreference) | A [Preference](/reference/kotlin/android/preference/Preference) that displays a list of entries as a dialog. |\n| [Preference](/reference/kotlin/android/preference/Preference) | Represents the basic Preference UI building block displayed by a [PreferenceActivity](/reference/kotlin/android/preference/PreferenceActivity) in the form of a [ListView](../widget/ListView.html#). |\n| [PreferenceActivity](/reference/kotlin/android/preference/PreferenceActivity) | This is the base class for an activity to show a hierarchy of preferences to the user. |\n| [PreferenceCategory](/reference/kotlin/android/preference/PreferenceCategory) | Used to group [Preference](/reference/kotlin/android/preference/Preference) objects and provide a disabled title above the group. |\n| [PreferenceFragment](/reference/kotlin/android/preference/PreferenceFragment) | Shows a hierarchy of [Preference](/reference/kotlin/android/preference/Preference) objects as lists. |\n| [PreferenceGroup](/reference/kotlin/android/preference/PreferenceGroup) | A container for multiple [Preference](/reference/kotlin/android/preference/Preference) objects. |\n| [PreferenceManager](/reference/kotlin/android/preference/PreferenceManager) | Used to help create [Preference](/reference/kotlin/android/preference/Preference) hierarchies from activities or XML. |\n| [PreferenceScreen](/reference/kotlin/android/preference/PreferenceScreen) | Represents a top-level [Preference](/reference/kotlin/android/preference/Preference) that is the root of a Preference hierarchy. |\n| [RingtonePreference](/reference/kotlin/android/preference/RingtonePreference) | A [Preference](/reference/kotlin/android/preference/Preference) that allows the user to choose a ringtone from those on the device. |\n| [SwitchPreference](/reference/kotlin/android/preference/SwitchPreference) | A [Preference](/reference/kotlin/android/preference/Preference) that provides a two-state toggleable option. |\n| [TwoStatePreference](/reference/kotlin/android/preference/TwoStatePreference) | Common base class for preferences that have two selectable states, persist a boolean value in SharedPreferences, and may have dependent preferences that are enabled/disabled based on the current state. |"]]