Android APIs
public abstract class

LeanbackPreferenceFragment

extends BaseLeanbackPreferenceFragment
java.lang.Object
   ↳ android.app.Fragment
     ↳ android.support.v14.preference.PreferenceFragment
       ↳ android.support.v17.preference.BaseLeanbackPreferenceFragment
         ↳ android.support.v17.preference.LeanbackPreferenceFragment

Class Overview

This fragment provides a fully decorated leanback-style preference fragment, including a list background and header.

Summary

[Expand]
Inherited XML Attributes
From class android.app.Fragment
[Expand]
Inherited Constants
From class android.support.v14.preference.PreferenceFragment
From interface android.content.ComponentCallbacks2
Public Constructors
LeanbackPreferenceFragment()
Public Methods
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Called to have the fragment instantiate its user interface view.
void onViewCreated(View view, Bundle savedInstanceState)
Called immediately after onCreateView(LayoutInflater, ViewGroup, Bundle) has returned, but before any saved state has been restored in to the view.
[Expand]
Inherited Methods
From class android.support.v17.preference.BaseLeanbackPreferenceFragment
From class android.support.v14.preference.PreferenceFragment
From class android.app.Fragment
From class java.lang.Object
From interface android.support.v7.preference.PreferenceManager.OnPreferenceTreeClickListener
From interface android.support.v7.preference.PreferenceManager.OnDisplayPreferenceDialogListener
From interface android.support.v7.preference.PreferenceManager.OnNavigateToScreenListener
From interface android.support.v7.preference.DialogPreference.TargetFragment
From interface android.content.ComponentCallbacks2
From interface android.view.View.OnCreateContextMenuListener
From interface android.content.ComponentCallbacks

Public Constructors

public LeanbackPreferenceFragment ()

Public Methods

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

Called to have the fragment instantiate its user interface view. This is optional, and non-graphical fragments can return null (which is the default implementation). This will be called between onCreate(Bundle) and onActivityCreated(Bundle).

If you return a View from here, you will later be called in onDestroyView() when the view is being released.

Parameters
inflater The LayoutInflater object that can be used to inflate any views in the fragment,
container If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view.
savedInstanceState If non-null, this fragment is being re-constructed from a previous saved state as given here.
Returns
  • Return the View for the fragment's UI, or null.

public void onViewCreated (View view, Bundle savedInstanceState)

Called immediately after onCreateView(LayoutInflater, ViewGroup, Bundle) has returned, but before any saved state has been restored in to the view. This gives subclasses a chance to initialize themselves once they know their view hierarchy has been completely created. The fragment's view hierarchy is not however attached to its parent at this point.

Parameters
view The View returned by onCreateView(LayoutInflater, ViewGroup, Bundle).
savedInstanceState If non-null, this fragment is being re-constructed from a previous saved state as given here.