Most visited

Recently visited

LeanbackListPreferenceDialogFragment

public class LeanbackListPreferenceDialogFragment
extends LeanbackPreferenceDialogFragment

java.lang.Object
   ↳ android.app.Fragment
     ↳ android.support.v17.preference.LeanbackPreferenceDialogFragment
       ↳ android.support.v17.preference.LeanbackListPreferenceDialogFragment


Summary

Nested classes

class LeanbackListPreferenceDialogFragment.AdapterMulti

 

class LeanbackListPreferenceDialogFragment.AdapterSingle

 

class LeanbackListPreferenceDialogFragment.ViewHolder

 

Inherited XML attributes

From class android.app.Fragment

Inherited constants

From class android.support.v17.preference.LeanbackPreferenceDialogFragment
From interface android.content.ComponentCallbacks2

Public constructors

LeanbackListPreferenceDialogFragment()

Public methods

static LeanbackListPreferenceDialogFragment newInstanceMulti(String key)
static LeanbackListPreferenceDialogFragment newInstanceSingle(String key)
void onCreate(Bundle savedInstanceState)

被调用来做一个片段的初始创建。

Adapter onCreateAdapter()
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

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

Inherited methods

From class android.support.v17.preference.LeanbackPreferenceDialogFragment
From class android.app.Fragment
From class java.lang.Object
From interface android.content.ComponentCallbacks2
From interface android.view.View.OnCreateContextMenuListener
From interface android.content.ComponentCallbacks

Public constructors

LeanbackListPreferenceDialogFragment

LeanbackListPreferenceDialogFragment ()

Public methods

newInstanceMulti

LeanbackListPreferenceDialogFragment newInstanceMulti (String key)

Parameters
key String
Returns
LeanbackListPreferenceDialogFragment

newInstanceSingle

LeanbackListPreferenceDialogFragment newInstanceSingle (String key)

Parameters
key String
Returns
LeanbackListPreferenceDialogFragment

onCreate

void onCreate (Bundle savedInstanceState)

被调用来做一个片段的初始创建。 这将在onAttach(Activity)之后和onAttach(Activity)之前onCreateView(LayoutInflater, ViewGroup, Bundle) ,但如果片段实例在Activity重新创建期间保留(请参阅setRetainInstance(boolean) ),则不会调用该实例。

请注意,这可以在片段的活动仍处于创建过程中时调用。 因此,您不能依赖于此时正在初始化活动的内容视图层次结构。 如果您想在创建活动本身后进行工作,请参阅onActivityCreated(Bundle)

如果您的应用targetSdkVersion为23或更低,则在onCreate返回后,将恢复从savedInstanceState恢复的子片段。 当定位N或更高版本并且在N或更新平台版本上运行时,它们将被恢复Fragment.onCreate

Parameters
savedInstanceState Bundle: If the fragment is being re-created from a previous saved state, this is the state.

onCreateAdapter

Adapter onCreateAdapter ()

Returns
Adapter

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.

Hooray!