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


此片段提供了一个完全装饰的背斜式首选片段,包括列表背景和标题。

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)

调用以使片段实例化其用户界面视图。

void onViewCreated(View view, Bundle savedInstanceState)

onCreateView(LayoutInflater, ViewGroup, Bundle)已经返回之后立即调用,但在任何保存的状态恢复到视图之前。

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)

调用以使片段实例化其用户界面视图。 这是可选的,非图形片段可以返回null(这是默认实现)。 这将在onCreate(Bundle)onActivityCreated(Bundle)之间onActivityCreated(Bundle)

如果你从这里返回视图,那么当视图被释放时,你将在 onDestroyView()被调用。

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)

onCreateView(LayoutInflater, ViewGroup, Bundle)已返回之后立即调用,但在任何已保存的状态已恢复到视图之前调用。 这让子类有机会在知道其视图层次已完全创建后自行初始化。 此时片段的视图层次不会附加到其父项。

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!