Most visited

Recently visited

LeanbackPreferenceFragment

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


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

Summary

Inherited XML attributes

From class android.support.v14.preference.PreferenceFragment
From class android.app.Fragment

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.

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

LeanbackPreferenceFragment

LeanbackPreferenceFragment ()

Public methods

onCreateView

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 LayoutInflater: The LayoutInflater object that can be used to inflate any views in the fragment,
container ViewGroup: 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 Bundle: If non-null, this fragment is being re-constructed from a previous saved state as given here.
Returns
View Return the View for the fragment's UI, or null.

onViewCreated

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 View: The View returned by onCreateView(LayoutInflater, ViewGroup, Bundle).
savedInstanceState Bundle: If non-null, this fragment is being re-constructed from a previous saved state as given here.

Hooray!