The preferences portion of an application should be ran as a separate {@link android.app.Activity} that extends the {@link android.preference.PreferenceActivity} class. In the PreferenceActivity, a {@link android.preference.PreferenceScreen} object should be the root element of the layout. The PreferenceScreen contains {@link android.preference.Preference} elements such as a {@link android.preference.CheckBoxPreference}, {@link android.preference.EditTextPreference}, {@link android.preference.ListPreference}, {@link android.preference.PreferenceCategory}, or {@link android.preference.RingtonePreference}.
All settings made for a given {@link android.preference.Preference} will be automatically saved to the application's instance of {@link android.content.SharedPreferences}. Access to the SharedPreferences is simple with {@link android.preference.Preference#getSharedPreferences()}.
Note that saved preferences are accessible only to the application that created them.