/**@class android.preference.PreferenceScreen implements android.widget.AdapterView.OnItemClickListener implements android.content.DialogInterface.OnDismissListener @extends android.preference.PreferenceGroup Represents a top-level {@link android.preference.Preference} that is the root of a Preference hierarchy. A {@link android.preference.PreferenceActivity} points to an instance of this class to show the preferences. To instantiate this class, use {@link android.preference.PreferenceManager#createPreferenceScreen(Context)}. <ul> This class can appear in two places: <li> When a {@link android.preference.PreferenceActivity} points to this, it is used as the root and is not shown (only the contained preferences are shown). <li> When it appears inside another preference hierarchy, it is shown and serves as the gateway to another screen of preferences (either by showing another screen of preferences as a {@link Dialog} or via a {@link Context#startActivity(android.content.Intent)} from the {@link android.preference.Preference#getIntent()}). The children of this {@link android.preference.PreferenceScreen} are NOT shown in the screen that this {@link android.preference.PreferenceScreen} is shown in. Instead, a separate screen will be shown when this preference is clicked. </ul> <p>Here's an example XML layout of a PreferenceScreen:</p> <pre> <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> </pre> <p> In this example, the "first_preferencescreen" will be used as the root of the hierarchy and given to a {@link android.preference.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). <div class="special reference"> <h3>Developer Guides</h3> <p>For information about building a settings UI with Preferences, read the <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a> guide.</p> </div> @see PreferenceCategory @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a> <a href="{@docRoot}reference/androidx/preference/package-summary.html"> Preference Library</a> for consistent behavior across all devices. For more information on using the AndroidX Preference Library see <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>. */ var PreferenceScreen = { /**Returns an adapter that can be attached to a {@link android.preference.PreferenceActivity} or {@link android.preference.PreferenceFragment} to show the preferences contained in this {@link android.preference.PreferenceScreen}. <p> This {@link android.preference.PreferenceScreen} will NOT appear in the returned adapter, instead it appears in the hierarchy above this {@link android.preference.PreferenceScreen}. <p> This adapter's {@link Adapter#getItem(int)} should always return a subclass of {@link android.preference.Preference}. @return {Object {android.widget.ListAdapter}} An adapter that provides the {@link Preference} contained in this {@link PreferenceScreen}. */ getRootAdapter : function( ) {}, /**Binds a {@link ListView} to the preferences contained in this {@link android.preference.PreferenceScreen} via {@link #getRootAdapter}(). It also handles passing list item clicks to the corresponding {@link android.preference.Preference} contained by this {@link android.preference.PreferenceScreen}. @param {Object {ListView}} listView The list view to attach to. */ bind : function( ) {}, /** */ onDismiss : function( ) {}, /**Used to get a handle to the dialog. This is useful for cases where we want to manipulate the dialog as we would with any other activity or view. */ getDialog : function( ) {}, /** */ onItemClick : function( ) {}, };