Most visited

Recently visited

LeanbackPreferenceDialogFragment

public class LeanbackPreferenceDialogFragment
extends Fragment

java.lang.Object
   ↳ android.app.Fragment
     ↳ android.support.v17.preference.LeanbackPreferenceDialogFragment
Known Direct Subclasses


Summary

Inherited XML attributes

From class android.app.Fragment

Constants

String ARG_KEY

Inherited constants

From interface android.content.ComponentCallbacks2

Public constructors

LeanbackPreferenceDialogFragment()

Public methods

DialogPreference getPreference()
void onCreate(Bundle savedInstanceState)

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

Inherited methods

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

Constants

ARG_KEY

String ARG_KEY

常量值:“键”

Public constructors

LeanbackPreferenceDialogFragment

LeanbackPreferenceDialogFragment ()

Public methods

getPreference

DialogPreference getPreference ()

Returns
DialogPreference

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.

Hooray!