Android 12 Developer Preview is here! Try it out, and give us your feedback!


abstract class LeanbackSettingsFragmentCompat : Fragment, PreferenceFragmentCompat.OnPreferenceStartFragmentCallback, PreferenceFragmentCompat.OnPreferenceStartScreenCallback, PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback
   ↳ androidx.leanback.preference.LeanbackSettingsFragmentCompat

This fragment provides a container for displaying a LeanbackPreferenceFragmentCompat

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

The sample implements PreferenceFragmentCompat.OnPreferenceStartFragmentCallback#onPreferenceStartFragment( * PreferenceFragmentCompat, Preference), PreferenceFragmentCompat.OnPreferenceStartScreenCallback#onPreferenceStartScreen( * PreferenceFragmentCompat, PreferenceScreen), and onPreferenceStartInitialScreen():


Public constructors

This fragment provides a container for displaying a LeanbackPreferenceFragmentCompat

Public methods
open View?
onCreateView(@NonNull inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?)

open Unit

open Boolean

abstract Unit

Called to instantiate the initial PreferenceFragment to be shown in this fragment.

open Unit

open Unit
onViewCreated(@NonNull view: View, savedInstanceState: Bundle?)

open Unit
startImmersiveFragment(@NonNull fragment: Fragment)

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

open Unit
startPreferenceFragment(@NonNull fragment: Fragment)

Displays a preference fragment to the user.

Inherited functions