See Also: PreferenceScreen Members
Represents a top-level Android.Preferences.Preference that is the root of a Preference hierarchy. A Android.Preferences.PreferenceActivity points to an instance of this class to show the preferences. To instantiate this class, use PreferenceManager.CreatePreferenceScreen(Android.Content.Context).
Here's an example XML layout of a PreferenceScreen:
xml Example
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:key="first_preferencescreen"> <CheckBoxPreference android:key="wifi enabled" android:title="WiFi" /> <PreferenceScreen android:key="second_preferencescreen" android:title="WiFi settings"> <CheckBoxPreference android:key="prefer wifi" android:title="Prefer WiFi" /> ... other preferences here ... </PreferenceScreen> </PreferenceScreen>
In this example, the "first_preferencescreen" will be used as the root of the hierarchy and given to a Android.Preferences.PreferenceActivity. The first screen will show preferences "WiFi" (which can be used to quickly enable/disable WiFi) and "WiFi settings". The "WiFi settings" is the "second_preferencescreen" and when clicked will show another screen of preferences such as "Prefer WiFi" (and the other preferences that are children of the "second_preferencescreen" tag).
For information about building a settings UI with Preferences, read the Settings guide.