# LeanbackSettingsFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:preference-leanback-v17:28.0.0-alpha1  
Summary:[Inherited Constants](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#inhconstants)\|[Ctors](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)  

# LeanbackSettingsFragment

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


abstract
class
LeanbackSettingsFragment
`  
`


``

extends `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)`


``


implements

`[PreferenceFragment.OnPreferenceStartFragmentCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback)`,

`[PreferenceFragment.OnPreferenceStartScreenCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartScreenCallback)`,

`[PreferenceFragment.OnPreferenceDisplayDialogCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceDisplayDialogCallback)`


`

|---|---|---------------------------------------------------------|
| java.lang.Object                                              |||
| ↳ | [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) ||
|   | ↳ | android.support.v17.preference.LeanbackSettingsFragment |

<br />

*** ** * ** ***

This fragment provides a container for displaying a[LeanbackPreferenceFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackPreferenceFragment)

The following sample code shows a simple leanback preference fragment that is populated from a resource. The resource it loads is:  

```
<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="@string/root_title">

    <Preference
        android:key="basic_preference"
        android:title="@string/title_basic_preference"
        android:summary="@string/summary_basic_preference" />

    <Preference
        android:key="stylish_preference"
        android:title="@string/title_stylish_preference"
        android:summary="@string/summary_stylish_preference" />

    <Preference
        android:key="preference_with_icon"
        android:title="Preference with icon"
        android:summary="This preference has an icon"
        android:icon="@android:drawable/ic_menu_camera" />

    <PreferenceCategory
        android:title="@string/inline_preferences">

        <CheckBoxPreference
            android:key="checkbox_preference"
            android:title="@string/title_checkbox_preference"
            android:summary="@string/summary_checkbox_preference" />

        <SwitchPreference
            android:key="switch_preference"
            android:title="Switch preference"
            android:summary="This is a switch" />

        <DropDownPreference
            android:key="dropdown_preference"
            android:title="@string/title_dropdown_preference"
            android:summary="@string/summary_dropdown_preference"
            android:entries="@array/entries_list_preference"
            android:entryValues="@array/entryvalues_list_preference" />

    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/dialog_based_preferences">

        <EditTextPreference
            android:key="edittext_preference"
            android:title="@string/title_edittext_preference"
            android:summary="@string/summary_edittext_preference"
            android:dialogTitle="@string/dialog_title_edittext_preference" />

        <ListPreference
            android:key="list_preference"
            android:title="@string/title_list_preference"
            android:summary="@string/summary_list_preference"
            android:entries="@array/entries_list_preference"
            android:entryValues="@array/entryvalues_list_preference"
            android:dialogTitle="@string/dialog_title_list_preference" />

        <MultiSelectListPreference
            android:key="multi_select_list_preference"
            android:title="@string/title_multi_list_preference"
            android:summary="@string/summary_multi_list_preference"
            android:entries="@array/entries_list_preference"
            android:entryValues="@array/entryvalues_list_preference"
            android:dialogTitle="@string/dialog_title_multi_list_preference" />

    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/launch_preferences">

        <!-- This PreferenceScreen tag serves as a screen break (similar to page break
             in word processing). Like for other preference types, we assign a key
             here so it is able to save and restore its instance state. -->
        <PreferenceScreen
            android:key="screen_preference"
            android:title="@string/title_screen_preference"
            android:summary="@string/summary_screen_preference">

            <!-- You can place more preferences here that will be shown on the next screen. -->

            <CheckBoxPreference
                android:key="next_screen_checkbox_preference"
                android:title="@string/title_next_screen_toggle_preference"
                android:summary="@string/summary_next_screen_toggle_preference" />

        </PreferenceScreen>

        <PreferenceScreen
            android:title="@string/title_intent_preference"
            android:summary="@string/summary_intent_preference">

            <intent android:action="android.intent.action.VIEW"
                android:data="http://www.android.com" />

        </PreferenceScreen>

    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/preference_attributes">

        <CheckBoxPreference
            android:key="parent_checkbox_preference"
            android:title="@string/title_parent_preference"
            android:summary="@string/summary_parent_preference" />

        <!-- The visual style of a child is defined by this styled theme attribute. -->
        <CheckBoxPreference
            android:key="child_checkbox_preference"
            android:dependency="parent_checkbox_preference"
            android:layout="?android:attr/preferenceLayoutChild"
            android:title="@string/title_child_preference"
            android:summary="@string/summary_child_preference" />

    </PreferenceCategory>

</PreferenceScreen>
```

The sample implements[onPreferenceStartFragment(PreferenceFragment, Preference)](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#onPreferenceStartFragment(android.support.v14.preference.PreferenceFragment, android.support.v7.preference.Preference)),[onPreferenceStartScreen(PreferenceFragment, PreferenceScreen)](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartScreenCallback#onPreferenceStartScreen(android.support.v14.preference.PreferenceFragment, android.support.v7.preference.PreferenceScreen)), and[onPreferenceStartInitialScreen()](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#onPreferenceStartInitialScreen()):  

```
public static class SettingsFragment extends LeanbackSettingsFragment {
    @Override
    public void onPreferenceStartInitialScreen() {
        startPreferenceFragment(new PrefsFragment());
    }

    @Override
    public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) {
        final Fragment f =
                Fragment.instantiate(getActivity(), pref.getFragment(), pref.getExtras());
        f.setTargetFragment(caller, 0);
        if (f instanceof PreferenceFragment || f instanceof PreferenceDialogFragment) {
            startPreferenceFragment(f);
        } else {
            startImmersiveFragment(f);
        }
        return true;
    }

    @Override
    public boolean onPreferenceStartScreen(PreferenceFragment caller, PreferenceScreen pref) {
        final Fragment f = new PrefsFragment();
        final Bundle args = new Bundle(1);
        args.putString(PreferenceFragment.ARG_PREFERENCE_ROOT, pref.getKey());
        f.setArguments(args);
        startPreferenceFragment(f);
        return true;
    }
}

public static class PrefsFragment extends LeanbackPreferenceFragment {

    @Override
    public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
        // Load the preferences from an XML resource
        setPreferencesFromResource(R.xml.preferences, rootKey);
    }
}
```

<br />

## Summary

|                                                                                                                                                                                                                                                                                                                   ### Inherited constants                                                                                                                                                                                                                                                                                                                   |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From interface` android.content.ComponentCallbacks2 ` |-------|---------------------------------------| | `int` | `TRIM_MEMORY_BACKGROUND` <br />       | | `int` | `TRIM_MEMORY_COMPLETE` <br />         | | `int` | `TRIM_MEMORY_MODERATE` <br />         | | `int` | `TRIM_MEMORY_RUNNING_CRITICAL` <br /> | | `int` | `TRIM_MEMORY_RUNNING_LOW` <br />      | | `int` | `TRIM_MEMORY_RUNNING_MODERATE` <br /> | | `int` | `TRIM_MEMORY_UI_HIDDEN` <br />        | |

|                                                                      ### Public constructors                                                                      ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[LeanbackSettingsFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#LeanbackSettingsFragment())`() ` |

|                                                                                                                                                                                                                                                                                    ### Public methods                                                                                                                                                                                                                                                                                     ||
|---------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[View](https://developer.android.com/reference/android/view/View.html) | ` `[onCreateView](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle))`(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` inflater, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` container, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) ` |
| ` void`                                                                   | ` `[onPause](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#onPause())`() `                                                                                                                                                                                                                                                                                                                                                                                   |
| ` boolean`                                                                | ` `[onPreferenceDisplayDialog](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#onPreferenceDisplayDialog(android.support.v14.preference.PreferenceFragment, android.support.v7.preference.Preference))`(`[PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)` caller, `[Preference](https://developer.android.com/reference/android/support/v7/preference/Preference)` pref) `                     |
| ` abstract void`                                                          | ` `[onPreferenceStartInitialScreen](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#onPreferenceStartInitialScreen())`() ` Called to instantiate the initial[PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)to be shown in this fragment.                                                                                                                                                       |
| ` void`                                                                   | ` `[onResume](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#onResume())`() `                                                                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                   | ` `[onViewCreated](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#onViewCreated(android.view.View, android.os.Bundle))`(`[View](https://developer.android.com/reference/android/view/View.html)` view, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` savedInstanceState) `                                                                                                                                                       |
| ` void`                                                                   | ` `[startImmersiveFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#startImmersiveFragment(android.app.Fragment))`(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` fragment) ` Displays a fragment to the user, temporarily replacing the contents of this fragment.                                                                                                                                                   |
| ` void`                                                                   | ` `[startPreferenceFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#startPreferenceFragment(android.app.Fragment))`(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` fragment) ` Displays a preference fragment to the user.                                                                                                                                                                                           |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From class` `[android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html)` ` |------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                              | ` dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3) `                                                                                                                                                                                                                                                                     | | ` final boolean`                                                                                     | ` equals(Object arg0) `                                                                                                                                                                                                                                                                                                                         | | ` final `[Activity](https://developer.android.com/reference/android/app/Activity.html)               | ` getActivity() `                                                                                                                                                                                                                                                                                                                               | | ` boolean`                                                                                           | ` getAllowEnterTransitionOverlap() `                                                                                                                                                                                                                                                                                                            | | ` boolean`                                                                                           | ` getAllowReturnTransitionOverlap() `                                                                                                                                                                                                                                                                                                           | | ` final `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                    | ` getArguments() `                                                                                                                                                                                                                                                                                                                              | | ` final `[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html) | ` getChildFragmentManager() `                                                                                                                                                                                                                                                                                                                   | | ` `[Context](https://developer.android.com/reference/android/content/Context.html)                   | ` getContext() `                                                                                                                                                                                                                                                                                                                                | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getEnterTransition() `                                                                                                                                                                                                                                                                                                                        | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getExitTransition() `                                                                                                                                                                                                                                                                                                                         | | ` final `[FragmentManager](https://developer.android.com/reference/android/app/FragmentManager.html) | ` getFragmentManager() `                                                                                                                                                                                                                                                                                                                        | | ` final Object`                                                                                      | ` getHost() `                                                                                                                                                                                                                                                                                                                                   | | ` final int`                                                                                         | ` getId() `                                                                                                                                                                                                                                                                                                                                     | | ` final `[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)  | ` getLayoutInflater() `                                                                                                                                                                                                                                                                                                                         | | ` `[LoaderManager](https://developer.android.com/reference/android/app/LoaderManager.html)           | ` getLoaderManager() `                                                                                                                                                                                                                                                                                                                          | | ` final `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)               | ` getParentFragment() `                                                                                                                                                                                                                                                                                                                         | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getReenterTransition() `                                                                                                                                                                                                                                                                                                                      | | ` final `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)     | ` getResources() `                                                                                                                                                                                                                                                                                                                              | | ` final boolean`                                                                                     | ` getRetainInstance() `                                                                                                                                                                                                                                                                                                                         | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getReturnTransition() `                                                                                                                                                                                                                                                                                                                       | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getSharedElementEnterTransition() `                                                                                                                                                                                                                                                                                                           | | ` `[Transition](https://developer.android.com/reference/android/transition/Transition.html)          | ` getSharedElementReturnTransition() `                                                                                                                                                                                                                                                                                                          | | ` final String`                                                                                      | ` getString(int arg0, Object... arg1) `                                                                                                                                                                                                                                                                                                         | | ` final String`                                                                                      | ` getString(int arg0) `                                                                                                                                                                                                                                                                                                                         | | ` final String`                                                                                      | ` getTag() `                                                                                                                                                                                                                                                                                                                                    | | ` final `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)               | ` getTargetFragment() `                                                                                                                                                                                                                                                                                                                         | | ` final int`                                                                                         | ` getTargetRequestCode() `                                                                                                                                                                                                                                                                                                                      | | ` final CharSequence`                                                                                | ` getText(int arg0) `                                                                                                                                                                                                                                                                                                                           | | ` boolean`                                                                                           | ` getUserVisibleHint() `                                                                                                                                                                                                                                                                                                                        | | ` `[View](https://developer.android.com/reference/android/view/View.html)                            | ` getView() `                                                                                                                                                                                                                                                                                                                                   | | ` final int`                                                                                         | ` hashCode() `                                                                                                                                                                                                                                                                                                                                  | | ` static `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)              | ` instantiate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, String arg1) `                                                                                                                                                                                                                            | | ` static `[Fragment](https://developer.android.com/reference/android/app/Fragment.html)              | ` instantiate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, String arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                                                                                                           | | ` final boolean`                                                                                     | ` isAdded() `                                                                                                                                                                                                                                                                                                                                   | | ` final boolean`                                                                                     | ` isDetached() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isHidden() `                                                                                                                                                                                                                                                                                                                                  | | ` final boolean`                                                                                     | ` isInLayout() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isRemoving() `                                                                                                                                                                                                                                                                                                                                | | ` final boolean`                                                                                     | ` isResumed() `                                                                                                                                                                                                                                                                                                                                 | | ` final boolean`                                                                                     | ` isStateSaved() `                                                                                                                                                                                                                                                                                                                              | | ` final boolean`                                                                                     | ` isVisible() `                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onActivityCreated(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onActivityResult(int arg0, int arg1, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg2) `                                                                                                                                                                                                                  | | ` void`                                                                                              | ` onAttach(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0) `                                                                                                                                                                                                                                              | | ` void`                                                                                              | ` onAttach(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0) `                                                                                                                                                                                                                                            | | ` void`                                                                                              | ` onAttachFragment(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` arg0) `                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onConfigurationChanged(`[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg0) `                                                                                                                                                                                                              | | ` boolean`                                                                                           | ` onContextItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                                | | ` void`                                                                                              | ` onCreate(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                                   | | ` `[Animator](https://developer.android.com/reference/android/animation/Animator.html)               | ` onCreateAnimator(int arg0, boolean arg1, int arg2) `                                                                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) `                | | ` void`                                                                                              | ` onCreateOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0, `[MenuInflater](https://developer.android.com/reference/android/view/MenuInflater.html)` arg1) `                                                                                                                                           | | ` `[View](https://developer.android.com/reference/android/view/View.html)                            | ` onCreateView(`[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)` arg0, `[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                   | | ` void`                                                                                              | ` onDestroy() `                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onDestroyOptionsMenu() `                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onDestroyView() `                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` onDetach() `                                                                                                                                                                                                                                                                                                                                  | | ` `[LayoutInflater](https://developer.android.com/reference/android/view/LayoutInflater.html)        | ` onGetLayoutInflater(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` onHiddenChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` onInflate(`[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                   | | ` void`                                                                                              | ` onInflate(`[Activity](https://developer.android.com/reference/android/app/Activity.html)` arg0, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                             | | ` void`                                                                                              | ` onInflate(`[Context](https://developer.android.com/reference/android/content/Context.html)` arg0, `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)` arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                           | | ` void`                                                                                              | ` onLowMemory() `                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` onMultiWindowModeChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onMultiWindowModeChanged(boolean arg0, `[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg1) `                                                                                                                                                                                              | | ` boolean`                                                                                           | ` onOptionsItemSelected(`[MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)` arg0) `                                                                                                                                                                                                                                | | ` void`                                                                                              | ` onOptionsMenuClosed(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                                          | | ` void`                                                                                              | ` onPause() `                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` onPictureInPictureModeChanged(boolean arg0, `[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg1) `                                                                                                                                                                                         | | ` void`                                                                                              | ` onPictureInPictureModeChanged(boolean arg0) `                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` onPrepareOptionsMenu(`[Menu](https://developer.android.com/reference/android/view/Menu.html)` arg0) `                                                                                                                                                                                                                                         | | ` void`                                                                                              | ` onRequestPermissionsResult(int arg0, String[] arg1, int[] arg2) `                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` onResume() `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                              | ` onSaveInstanceState(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` onStart() `                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` onStop() `                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                              | ` onTrimMemory(int arg0) `                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                              | ` onViewCreated(`[View](https://developer.android.com/reference/android/view/View.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                               | | ` void`                                                                                              | ` onViewStateRestored(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                        | | ` void`                                                                                              | ` postponeEnterTransition() `                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                              | ` registerForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                                       | | ` final void`                                                                                        | ` requestPermissions(String[] arg0, int arg1) `                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                              | ` setAllowEnterTransitionOverlap(boolean arg0) `                                                                                                                                                                                                                                                                                                | | ` void`                                                                                              | ` setAllowReturnTransitionOverlap(boolean arg0) `                                                                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` setArguments(`[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg0) `                                                                                                                                                                                                                                               | | ` void`                                                                                              | ` setEnterSharedElementCallback(`[SharedElementCallback](https://developer.android.com/reference/android/app/SharedElementCallback.html)` arg0) `                                                                                                                                                                                               | | ` void`                                                                                              | ` setEnterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                         | | ` void`                                                                                              | ` setExitSharedElementCallback(`[SharedElementCallback](https://developer.android.com/reference/android/app/SharedElementCallback.html)` arg0) `                                                                                                                                                                                                | | ` void`                                                                                              | ` setExitTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                          | | ` void`                                                                                              | ` setHasOptionsMenu(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setInitialSavedState(`[Fragment.SavedState](https://developer.android.com/reference/android/app/Fragment.SavedState.html)` arg0) `                                                                                                                                                                                                            | | ` void`                                                                                              | ` setMenuVisibility(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setReenterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                       | | ` void`                                                                                              | ` setRetainInstance(boolean arg0) `                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                              | ` setReturnTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                                        | | ` void`                                                                                              | ` setSharedElementEnterTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                            | | ` void`                                                                                              | ` setSharedElementReturnTransition(`[Transition](https://developer.android.com/reference/android/transition/Transition.html)` arg0) `                                                                                                                                                                                                           | | ` void`                                                                                              | ` setTargetFragment(`[Fragment](https://developer.android.com/reference/android/app/Fragment.html)` arg0, int arg1) `                                                                                                                                                                                                                           | | ` void`                                                                                              | ` setUserVisibleHint(boolean arg0) `                                                                                                                                                                                                                                                                                                            | | ` boolean`                                                                                           | ` shouldShowRequestPermissionRationale(String arg0) `                                                                                                                                                                                                                                                                                           | | ` void`                                                                                              | ` startActivity(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0) `                                                                                                                                                                                                                                         | | ` void`                                                                                              | ` startActivity(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg1) `                                                                                                                                                        | | ` void`                                                                                              | ` startActivityForResult(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, int arg1) `                                                                                                                                                                                                                      | | ` void`                                                                                              | ` startActivityForResult(`[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg0, int arg1, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg2) `                                                                                                                                     | | ` void`                                                                                              | ` startIntentSenderForResult(`[IntentSender](https://developer.android.com/reference/android/content/IntentSender.html)` arg0, int arg1, `[Intent](https://developer.android.com/reference/android/content/Intent.html)` arg2, int arg3, int arg4, int arg5, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` arg6) ` | | ` void`                                                                                              | ` startPostponedEnterTransition() `                                                                                                                                                                                                                                                                                                             | | ` String`                                                                                            | ` toString() `                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                              | ` unregisterForContextMenu(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                                                                                                                                                                                                                                     | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From interface` `[android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html)` ` |------------------|----------------------------| | ` abstract void` | ` onTrimMemory(int arg0) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From interface` `[android.view.View.OnCreateContextMenuListener](https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener.html)` ` |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` onCreateContextMenu(`[ContextMenu](https://developer.android.com/reference/android/view/ContextMenu.html)` arg0, `[View](https://developer.android.com/reference/android/view/View.html)` arg1, `[ContextMenu.ContextMenuInfo](https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html)` arg2) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From interface` `[android.support.v14.preference.PreferenceFragment.OnPreferenceStartFragmentCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback)` ` |---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[onPreferenceStartFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#onPreferenceStartFragment(android.support.v14.preference.PreferenceFragment, android.support.v7.preference.Preference))`(`[PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)` caller, `[Preference](https://developer.android.com/reference/android/support/v7/preference/Preference)` pref) ` Called when the user has clicked on a Preference that has a fragment class name associated with it. | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From interface` `[android.support.v14.preference.PreferenceFragment.OnPreferenceStartScreenCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartScreenCallback)` ` |---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[onPreferenceStartScreen](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartScreenCallback#onPreferenceStartScreen(android.support.v14.preference.PreferenceFragment, android.support.v7.preference.PreferenceScreen))`(`[PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)` caller, `[PreferenceScreen](https://developer.android.com/reference/android/support/v7/preference/PreferenceScreen)` pref) ` Called when the user has clicked on a PreferenceScreen item in order to navigate to a new screen of preferences. | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From interface` `[android.support.v14.preference.PreferenceFragment.OnPreferenceDisplayDialogCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceDisplayDialogCallback)` ` |---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[onPreferenceDisplayDialog](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceDisplayDialogCallback#onPreferenceDisplayDialog(android.support.v14.preference.PreferenceFragment, android.support.v7.preference.Preference))`(`[PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)` caller, `[Preference](https://developer.android.com/reference/android/support/v7/preference/Preference)` pref) ` | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#)From interface` `[android.content.ComponentCallbacks](https://developer.android.com/reference/android/content/ComponentCallbacks.html)` ` |------------------|------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` onConfigurationChanged(`[Configuration](https://developer.android.com/reference/android/content/res/Configuration.html)` arg0) ` | | ` abstract void` | ` onLowMemory() `                                                                                                                  | ||

## Public constructors

### LeanbackSettingsFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
LeanbackSettingsFragment ()
```

<br />

<br />

## Public methods

### onCreateView

```
View onCreateView (LayoutInflater inflater, 
                ViewGroup container, 
                Bundle savedInstanceState)
```

<br />

<br />

|                  Parameters                   ||
|----------------------|-------------------------|
| `inflater`           | `LayoutInflater` <br /> |
| `container`          | `ViewGroup` <br />      |
| `savedInstanceState` | `Bundle` <br />         |

|                                    Returns                                     ||
|------------------------------------------------------------------------|--------|
| [View](https://developer.android.com/reference/android/view/View.html) | <br /> |

### onPause

```
void onPause ()
```

<br />

<br />

### onPreferenceDisplayDialog

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onPreferenceDisplayDialog (PreferenceFragment caller, 
                Preference pref)
```

<br />

<br />

|              Parameters               ||
|----------|-----------------------------|
| `caller` | `PreferenceFragment` <br /> |
| `pref`   | `Preference` <br />         |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### onPreferenceStartInitialScreen

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onPreferenceStartInitialScreen ()
```

Called to instantiate the initial[PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)to be shown in this fragment. Implementations are expected to call[startPreferenceFragment(android.app.Fragment)](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment#startPreferenceFragment(android.app.Fragment)).

<br />

### onResume

```
void onResume ()
```

<br />

<br />

### onViewCreated

```
void onViewCreated (View view, 
                Bundle savedInstanceState)
```

<br />

<br />

|              Parameters               ||
|----------------------|-----------------|
| `view`               | `View` <br />   |
| `savedInstanceState` | `Bundle` <br /> |

### startImmersiveFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void startImmersiveFragment (Fragment fragment)
```

Displays a fragment to the user, temporarily replacing the contents of this fragment.

<br />

|                          Parameters                           ||
|------------|---------------------------------------------------|
| `fragment` | `Fragment`: Fragment instance to be added. <br /> |

### startPreferenceFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void startPreferenceFragment (Fragment fragment)
```

Displays a preference fragment to the user. This method can also be used to display list-style fragments on top of the stack of preference fragments.

<br />

|                          Parameters                           ||
|------------|---------------------------------------------------|
| `fragment` | `Fragment`: Fragment instance to be added. <br /> |

-

  ## Interfaces

  - [LeanbackListPreferenceDialogFragment.ViewHolder.OnItemClickListener](https://developer.android.com/reference/android/support/v17/preference/LeanbackListPreferenceDialogFragment.ViewHolder.OnItemClickListener)
-

  ## Classes

  - [BaseLeanbackPreferenceFragment](https://developer.android.com/reference/android/support/v17/preference/BaseLeanbackPreferenceFragment)
  - [LeanbackListPreferenceDialogFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackListPreferenceDialogFragment)
  - [LeanbackListPreferenceDialogFragment.AdapterMulti](https://developer.android.com/reference/android/support/v17/preference/LeanbackListPreferenceDialogFragment.AdapterMulti)
  - [LeanbackListPreferenceDialogFragment.AdapterSingle](https://developer.android.com/reference/android/support/v17/preference/LeanbackListPreferenceDialogFragment.AdapterSingle)
  - [LeanbackListPreferenceDialogFragment.ViewHolder](https://developer.android.com/reference/android/support/v17/preference/LeanbackListPreferenceDialogFragment.ViewHolder)
  - [LeanbackPreferenceDialogFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackPreferenceDialogFragment)
  - [LeanbackPreferenceFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackPreferenceFragment)
  - [LeanbackSettingsFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment)
  - [R](https://developer.android.com/reference/android/support/v17/preference/R)
  - [R.anim](https://developer.android.com/reference/android/support/v17/preference/R.anim)
  - [R.animator](https://developer.android.com/reference/android/support/v17/preference/R.animator)
  - [R.attr](https://developer.android.com/reference/android/support/v17/preference/R.attr)
  - [R.bool](https://developer.android.com/reference/android/support/v17/preference/R.bool)
  - [R.color](https://developer.android.com/reference/android/support/v17/preference/R.color)
  - [R.dimen](https://developer.android.com/reference/android/support/v17/preference/R.dimen)
  - [R.drawable](https://developer.android.com/reference/android/support/v17/preference/R.drawable)
  - [R.fraction](https://developer.android.com/reference/android/support/v17/preference/R.fraction)
  - [R.id](https://developer.android.com/reference/android/support/v17/preference/R.id)
  - [R.integer](https://developer.android.com/reference/android/support/v17/preference/R.integer)
  - [R.layout](https://developer.android.com/reference/android/support/v17/preference/R.layout)
  - [R.raw](https://developer.android.com/reference/android/support/v17/preference/R.raw)
  - [R.string](https://developer.android.com/reference/android/support/v17/preference/R.string)
  - [R.style](https://developer.android.com/reference/android/support/v17/preference/R.style)
  - [R.styleable](https://developer.android.com/reference/android/support/v17/preference/R.styleable)
  - [R.transition](https://developer.android.com/reference/android/support/v17/preference/R.transition)