BaseLeanbackPreferenceFragment


public abstract class BaseLeanbackPreferenceFragment extends PreferenceFragment

Known direct subclasses

This fragment provides a preference fragment with leanback-style behavior, suitable for embedding into broader UI elements.

Summary

Public constructors

Public methods

RecyclerView
onCreateRecyclerView(
    LayoutInflater inflater,
    ViewGroup parent,
    Bundle savedInstanceState
)

This method is deprecated.

Use PreferenceFragmentCompat instead

Inherited Constants

From android.content.ComponentCallbacks2
static final int
static final int
static final int
static final int
static final int
static final int
static final int
From androidx.preference.PreferenceFragment
static final String
ARG_PREFERENCE_ROOT = "androidx.preference.PreferenceFragmentCompat.PREFERENCE_ROOT"

This field is deprecated.

Use PreferenceFragmentCompat instead

Inherited methods

From android.app.Fragment
void
dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args)

This method is deprecated.

final boolean

This method is deprecated.

final Activity

This method is deprecated.

boolean

This method is deprecated.

boolean

This method is deprecated.

final Bundle

This method is deprecated.

final FragmentManager

This method is deprecated.

Context

This method is deprecated.

Transition

This method is deprecated.

Transition

This method is deprecated.

final FragmentManager

This method is deprecated.

final Object

This method is deprecated.

final int

This method is deprecated.

final LayoutInflater

This method is deprecated.

LoaderManager

This method is deprecated.

final Fragment

This method is deprecated.

Transition

This method is deprecated.

final Resources

This method is deprecated.

final boolean

This method is deprecated.

Transition

This method is deprecated.

Transition

This method is deprecated.

Transition

This method is deprecated.

final String
getString(int resId)

This method is deprecated.

final String

This method is deprecated.

final Fragment

This method is deprecated.

final int

This method is deprecated.

final CharSequence
getText(int resId)

This method is deprecated.

boolean

This method is deprecated.

View

This method is deprecated.

final int

This method is deprecated.

static Fragment
instantiate(Context context, String fname)

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

final boolean

This method is deprecated.

void
onActivityCreated(Bundle savedInstanceState)

This method is deprecated.

void
onActivityResult(int requestCode, int resultCode, Intent data)

This method is deprecated.

void
onAttach(Context context)

This method is deprecated.

void
onAttachFragment(Fragment childFragment)

This method is deprecated.

void

This method is deprecated.

boolean

This method is deprecated.

void
onCreate(Bundle savedInstanceState)

This method is deprecated.

Animator
onCreateAnimator(int transit, boolean enter, int nextAnim)

This method is deprecated.

void
onCreateContextMenu(
    ContextMenu menu,
    View v,
    ContextMenu.ContextMenuInfo menuInfo
)

This method is deprecated.

void

This method is deprecated.

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

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

LayoutInflater
onGetLayoutInflater(Bundle savedInstanceState)

This method is deprecated.

void
onHiddenChanged(boolean hidden)

This method is deprecated.

void
onInflate(AttributeSet attrs, Bundle savedInstanceState)

This method is deprecated.

void

This method is deprecated.

void
onMultiWindowModeChanged(
    boolean isInMultiWindowMode,
    Configuration newConfig
)

This method is deprecated.

boolean

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
onPictureInPictureModeChanged(
    boolean isInPictureInPictureMode,
    Configuration newConfig
)

This method is deprecated.

void

This method is deprecated.

void
onRequestPermissionsResult(
    int requestCode,
    String[] permissions,
    int[] grantResults
)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
onTrimMemory(int level)

This method is deprecated.

void
onViewCreated(View view, Bundle savedInstanceState)

This method is deprecated.

void
onViewStateRestored(Bundle savedInstanceState)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

final void
requestPermissions(String[] permissions, int requestCode)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
setHasOptionsMenu(boolean hasMenu)

This method is deprecated.

void

This method is deprecated.

void
setMenuVisibility(boolean menuVisible)

This method is deprecated.

void

This method is deprecated.

void
setRetainInstance(boolean retain)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
setTargetFragment(Fragment fragment, int requestCode)

This method is deprecated.

void
setUserVisibleHint(boolean isVisibleToUser)

This method is deprecated.

boolean

This method is deprecated.

void

This method is deprecated.

void
startActivityForResult(Intent intent, int requestCode)

This method is deprecated.

void
startIntentSenderForResult(
    IntentSender intent,
    int requestCode,
    Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags,
    Bundle options
)

This method is deprecated.

void

This method is deprecated.

String

This method is deprecated.

void

This method is deprecated.

From androidx.preference.PreferenceFragment
void
addPreferencesFromResource(@XmlRes int preferencesResId)

This method is deprecated.

Use PreferenceFragmentCompat instead

T

This method is deprecated.

Use PreferenceFragmentCompat instead

final RecyclerView

This method is deprecated.

Use PreferenceFragmentCompat instead

PreferenceManager

This method is deprecated.

Use PreferenceFragmentCompat instead

PreferenceScreen

This method is deprecated.

Use PreferenceFragmentCompat instead

void
onCreate(@Nullable Bundle savedInstanceState)

This method is deprecated.

@NonNull RecyclerView.Adapter

This method is deprecated.

Use PreferenceFragmentCompat instead

@NonNull RecyclerView.LayoutManager

This method is deprecated.

Use PreferenceFragmentCompat instead

abstract void
onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey)

This method is deprecated.

Use PreferenceFragmentCompat instead

@NonNull View
onCreateView(
    @NonNull LayoutInflater inflater,
    @Nullable ViewGroup container,
    @Nullable Bundle savedInstanceState
)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

Use PreferenceFragmentCompat instead

void

This method is deprecated.

Use PreferenceFragmentCompat instead

boolean

This method is deprecated.

Use PreferenceFragmentCompat instead

void

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)

This method is deprecated.

void

This method is deprecated.

Use PreferenceFragmentCompat instead

void

This method is deprecated.

Use PreferenceFragmentCompat instead

void

This method is deprecated.

Use PreferenceFragmentCompat instead

void
setDividerHeight(int height)

This method is deprecated.

Use PreferenceFragmentCompat instead

void

This method is deprecated.

Use PreferenceFragmentCompat instead

void
setPreferencesFromResource(
    @XmlRes int preferencesResId,
    @Nullable String key
)

This method is deprecated.

Use PreferenceFragmentCompat instead

Public constructors

BaseLeanbackPreferenceFragment

Added in 1.1.0
Deprecated in 1.1.0
public BaseLeanbackPreferenceFragment()

Public methods

onCreateRecyclerView

Added in 1.1.0
Deprecated in 1.1.0
public RecyclerView onCreateRecyclerView(
    LayoutInflater inflater,
    ViewGroup parent,
    Bundle savedInstanceState
)

Creates the RecyclerView used to display the preferences. Subclasses may override this to return a customized RecyclerView.

Parameters
LayoutInflater inflater

The LayoutInflater object that can be used to inflate the RecyclerView.

ViewGroup parent

The parent view that the RecyclerView will be attached to. This method should not add the view itself, but this can be used to generate the layout params of the view.

Bundle savedInstanceState

If non-null, this view is being re-constructed from a previous saved state as given here.

Returns
RecyclerView

A new RecyclerView object to be placed into the view hierarchy