package

android.preference

Classes | Description

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 Activity that extends the PreferenceActivity class. In the PreferenceActivity, a PreferenceScreen object should be the root element of the layout. The PreferenceScreen contains Preference elements such as a CheckBoxPreference, EditTextPreference, ListPreference, PreferenceCategory, or RingtonePreference.

All settings made for a given Preference will be automatically saved to the application's instance of SharedPreferences. Access to the SharedPreferences is simple with getSharedPreferences().

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