Android.Preferences Namespace

The preferences portion of an application should be ran as a separate Android.App.Activity that extends the Android.Preferences.PreferenceActivity class.

Remarks

Provides classes that manage application preferences and implement the preferences UI. Using these ensures that all the preferences within each application are maintained in the same manner and the user experience is consistent with that of the system and other applications.

The preferences portion of an application should be ran as a separate Android.App.Activity that extends the Android.Preferences.PreferenceActivity class. In the PreferenceActivity, a Android.Preferences.PreferenceScreen object should be the root element of the layout. The PreferenceScreen contains Android.Preferences.Preference elements such as a Android.Preferences.CheckBoxPreference, Android.Preferences.EditTextPreference, Android.Preferences.ListPreference, Android.Preferences.PreferenceCategory, or Android.Preferences.RingtonePreference.

All settings made for a given Android.Preferences.Preference will be automatically saved to the application's instance of Android.Content.ISharedPreferences. Access to the SharedPreferences is simple with Android.Preferences.Preference.SharedPreferences.

Note that saved preferences are accessible only to the application that created them.

Classes

TypeReason
CheckBoxPreferenceA Android.Preferences.Preference that provides checkbox widget functionality.
DialogPreferenceA base class for Android.Preferences.Preference objects that are dialog-based.
EditTextPreferenceA Android.Preferences.Preference that allows for string input.
ListPreferenceA Android.Preferences.Preference that displays a list of entries as a dialog.
MultiSelectListPreferenceA Android.Preferences.Preference that displays a list of entries as a dialog.
PreferenceRepresents the basic Preference UI building block displayed by a Android.Preferences.PreferenceActivity in the form of a Android.Widget.ListView.
Preference+BaseSavedStateA base class for managing the instance state of a Android.Preferences.Preference.
Preference+IOnPreferenceChangeListenerInterface definition for a callback to be invoked when the value of this Android.Preferences.Preference has been changed by the user and is about to be set and/or persisted.
Preference+IOnPreferenceClickListenerInterface definition for a callback to be invoked when a Android.Preferences.Preference is clicked.
Preference+PreferenceChangeEventArgsProvides data for the Android.Preferences.Preference.PreferenceChange event.
Preference+PreferenceClickEventArgsProvides data for the Android.Preferences.Preference.PreferenceClick event.
PreferenceActivityThis is the base class for an activity to show a hierarchy of preferences to the user.
PreferenceActivity+HeaderDescription of a single Header item that the user can select.
PreferenceActivity+Header+InterfaceConstsDocumentation for this section has not yet been entered.
PreferenceCategoryUsed to group Android.Preferences.Preference objects and provide a disabled title above the group.
PreferenceFragmentShows a hierarchy of Android.Preferences.Preference objects as lists.
PreferenceFragment+IOnPreferenceStartFragmentCallbackInterface that PreferenceFragment's containing activity should implement to be able to process preference items that wish to switch to a new fragment.
PreferenceGroupA container for multiple Android.Preferences.Preference objects.
PreferenceManagerUsed to help create Android.Preferences.Preference hierarchies from activities or XML.
PreferenceManager+ActivityResultEventArgsDocumentation for this section has not yet been entered.
PreferenceManager+IOnActivityDestroyListenerInterface definition for a class that will be called when the container's activity is destroyed.
PreferenceManager+IOnActivityResultListenerInterface definition for a class that will be called when the container's activity receives an activity result.
PreferenceManager+IOnActivityStopListenerInterface definition for a class that will be called when the container's activity is stopped.
PreferenceScreenRepresents a top-level Android.Preferences.Preference that is the root of a Preference hierarchy.
RingtonePreferenceA Android.Preferences.Preference that allows the user to choose a ringtone from those on the device.
SwitchPreferenceA Android.Preferences.Preference that provides a two-state toggleable option.
TwoStatePreferenceCommon 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.