The Android Developer Challenge is back! Submit your idea before December 2.

LeanbackPreferenceDialogFragmentCompat

public class LeanbackPreferenceDialogFragmentCompat
extends Fragment

java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ androidx.leanback.preference.LeanbackPreferenceDialogFragmentCompat


A fragment that shows DialogPreference, for example ListPreference or MultiSelectListPreference.

Summary

Constants

String ARG_KEY

Public constructors

LeanbackPreferenceDialogFragmentCompat()

Public methods

DialogPreference getPreference()

The DialogPreference that this dialog is showing.

void onCreate(Bundle savedInstanceState)

Called to do initial creation of a fragment.

Inherited methods

Constants

ARG_KEY

public static final String ARG_KEY

Constant Value: "key"

Public constructors

LeanbackPreferenceDialogFragmentCompat

public LeanbackPreferenceDialogFragmentCompat ()

Public methods

getPreference

public DialogPreference getPreference ()

The DialogPreference that this dialog is showing.

Returns
DialogPreference The DialogPreference that this dialog is showing.

onCreate

public void onCreate (Bundle savedInstanceState)

Called to do initial creation of a fragment. This is called after onAttach(Activity) and before onCreateView(LayoutInflater, ViewGroup, Bundle).

Note that this can be called while the fragment's activity is still in the process of being created. As such, you can not rely on things like the activity's content view hierarchy being initialized at this point. If you want to do work once the activity itself is created, see onActivityCreated(Bundle).

Any restored child fragments will be created before the base Fragment.onCreate method returns.

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