# ErrorFragment

Artifact: [androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/app/ErrorFragment.java+class:androidx.leanback.app.ErrorFragment) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***


```
public class ErrorFragment extends BrandedFragment
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) |||
|   | ↳ | [androidx.leanback.app.BrandedFragment](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment) ||
|   |   | ↳ | [androidx.leanback.app.ErrorFragment](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/leanback/app/ErrorSupportFragment`

A fragment for displaying an error indication.

## Summary

| ### Public constructors |
|---|
| `[ErrorFragment](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#ErrorFragment())()` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `[getBackgroundDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getBackgroundDrawable())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.OnClickListener.html` | `[getButtonClickListener](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getButtonClickListener())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` | `[getButtonText](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getButtonText())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `[getImageDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getImageDrawable())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `[getMessage](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getMessage())()` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[isBackgroundTranslucent](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#isBackgroundTranslucent())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` | `[onCreateView](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))( https://developer.android.com/reference/android/view/LayoutInflater.html inflater, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/ViewGroup.html container, https://developer.android.com/reference/android/os/Bundle.html savedInstanceState )` **This method is deprecated.** |
| `void` | `[onStart](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#onStart())()` **This method is deprecated.** |
| `void` | `[setBackgroundDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setBackgroundDrawable(android.graphics.drawable.Drawable))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setButtonClickListener](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setButtonClickListener(android.view.View.OnClickListener))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.OnClickListener.html clickListener)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setButtonText](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setButtonText(java.lang.String))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html text)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setDefaultBackground](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setDefaultBackground(boolean))(boolean translucent)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setImageDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setImageDrawable(android.graphics.drawable.Drawable))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` **This method is deprecated.** Deprecated in Java |
| `void` | `[setMessage](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setMessage(java.lang.CharSequence))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html message)` **This method is deprecated.** Deprecated in Java |

### Inherited Constants

From [android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html) `static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND = 40`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE = 80`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE = 60`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL = 15`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW = 10`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE = 5`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN = 20`

**This field is deprecated.** Deprecated in Java

### Inherited methods

From [androidx.leanback.app.BrandedFragment](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment) `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[getBadgeDrawable](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#getBadgeDrawable())()`

**This method is deprecated.** Deprecated in Java
`int` `[getSearchAffordanceColor](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#getSearchAffordanceColor())()`

**This method is deprecated.** Deprecated in Java
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/SearchOrbView.Colors` `[getSearchAffordanceColors](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#getSearchAffordanceColors())()`

**This method is deprecated.** Deprecated in Java
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` `[getTitle](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#getTitle())()`

**This method is deprecated.** Deprecated in Java
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html` `[getTitleView](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#getTitleView())()`

**This method is deprecated.** Deprecated in Java
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/leanback/widget/TitleViewAdapter` `[getTitleViewAdapter](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#getTitleViewAdapter())()`

**This method is deprecated.** Deprecated in Java
`void` `[installTitleView](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#installTitleView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))(
@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/LayoutInflater.html inflater,
@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/ViewGroup.html parent,
@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState
)`

**This method is deprecated.** Deprecated in Java
`final boolean` `[isShowingTitle](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#isShowingTitle())()`

**This method is deprecated.** Deprecated in Java
`void` `[onDestroyView](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#onDestroyView())()`

**This method is deprecated.**
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/View.html` `[onInflateTitleView](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#onInflateTitleView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))(
@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/LayoutInflater.html inflater,
@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/ViewGroup.html parent,
@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState
)`

**This method is deprecated.** Deprecated in Java
`void` `[onPause](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#onPause())()`

**This method is deprecated.**
`void` `[onResume](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#onResume())()`

**This method is deprecated.**
`void` `[onSaveInstanceState](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#onSaveInstanceState(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html outState)`

**This method is deprecated.**
`void` `[onViewCreated](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#onViewCreated(android.view.View,android.os.Bundle))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/view/View.html view, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[setBadgeDrawable](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#setBadgeDrawable(android.graphics.drawable.Drawable))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)`

**This method is deprecated.** Deprecated in Java
`void` `[setOnSearchClickedListener](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#setOnSearchClickedListener(android.view.View.OnClickListener))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.OnClickListener.html listener)`

**This method is deprecated.** Deprecated in Java
`void` `[setSearchAffordanceColor](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#setSearchAffordanceColor(int))(int color)`

**This method is deprecated.** Deprecated in Java
`void` `[setSearchAffordanceColors](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#setSearchAffordanceColors(androidx.leanback.widget.SearchOrbView.Colors))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/leanback/widget/SearchOrbView.Colors colors)`

**This method is deprecated.** Deprecated in Java
`void` `[setTitle](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#setTitle(java.lang.CharSequence))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html title)`

**This method is deprecated.** Deprecated in Java
`void` `[setTitleView](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#setTitleView(android.view.View))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.html titleView)`

**This method is deprecated.** Deprecated in Java
`void` `[showTitle](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#showTitle(int))(int flags)`

**This method is deprecated.** Deprecated in Java
`void` `[showTitle](https://developer.android.com/reference/androidx/leanback/app/BrandedFragment#showTitle(boolean))(boolean show)`

**This method is deprecated.** Deprecated in Java
From [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) `void` `[dump](https://developer.android.com/reference/android/app/Fragment.html#dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]))(https://developer.android.com/reference/java/lang/String.html prefix, https://developer.android.com/reference/java/io/FileDescriptor.html fd, https://developer.android.com/reference/java/io/PrintWriter.html writer, String[] args)`

**This method is deprecated.**
`final boolean` `[equals](https://developer.android.com/reference/android/app/Fragment.html#equals(java.lang.Object))(https://developer.android.com/reference/java/lang/Object.html o)`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/Activity.html` `[getActivity](https://developer.android.com/reference/android/app/Fragment.html#getActivity())()`

**This method is deprecated.**
`boolean` `[getAllowEnterTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#getAllowEnterTransitionOverlap())()`

**This method is deprecated.**
`boolean` `[getAllowReturnTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#getAllowReturnTransitionOverlap())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/os/Bundle.html` `[getArguments](https://developer.android.com/reference/android/app/Fragment.html#getArguments())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/FragmentManager.html` `[getChildFragmentManager](https://developer.android.com/reference/android/app/Fragment.html#getChildFragmentManager())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/content/Context.html` `[getContext](https://developer.android.com/reference/android/app/Fragment.html#getContext())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#getEnterTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getExitTransition](https://developer.android.com/reference/android/app/Fragment.html#getExitTransition())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/FragmentManager.html` `[getFragmentManager](https://developer.android.com/reference/android/app/Fragment.html#getFragmentManager())()`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/Object.html` `[getHost](https://developer.android.com/reference/android/app/Fragment.html#getHost())()`

**This method is deprecated.**
`final int` `[getId](https://developer.android.com/reference/android/app/Fragment.html#getId())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/view/LayoutInflater.html` `[getLayoutInflater](https://developer.android.com/reference/android/app/Fragment.html#getLayoutInflater())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/app/LoaderManager.html` `[getLoaderManager](https://developer.android.com/reference/android/app/Fragment.html#getLoaderManager())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/Fragment.html` `[getParentFragment](https://developer.android.com/reference/android/app/Fragment.html#getParentFragment())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getReenterTransition](https://developer.android.com/reference/android/app/Fragment.html#getReenterTransition())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/content/res/Resources.html` `[getResources](https://developer.android.com/reference/android/app/Fragment.html#getResources())()`

**This method is deprecated.**
`final boolean` `[getRetainInstance](https://developer.android.com/reference/android/app/Fragment.html#getRetainInstance())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#getReturnTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getSharedElementEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#getSharedElementEnterTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html` `[getSharedElementReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#getSharedElementReturnTransition())()`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/String.html` `[getString](https://developer.android.com/reference/android/app/Fragment.html#getString(int))(int resId)`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/String.html` `[getTag](https://developer.android.com/reference/android/app/Fragment.html#getTag())()`

**This method is deprecated.**
`final https://developer.android.com/reference/android/app/Fragment.html` `[getTargetFragment](https://developer.android.com/reference/android/app/Fragment.html#getTargetFragment())()`

**This method is deprecated.**
`final int` `[getTargetRequestCode](https://developer.android.com/reference/android/app/Fragment.html#getTargetRequestCode())()`

**This method is deprecated.**
`final https://developer.android.com/reference/java/lang/CharSequence.html` `[getText](https://developer.android.com/reference/android/app/Fragment.html#getText(int))(int resId)`

**This method is deprecated.**
`boolean` `[getUserVisibleHint](https://developer.android.com/reference/android/app/Fragment.html#getUserVisibleHint())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/view/View.html` `[getView](https://developer.android.com/reference/android/app/Fragment.html#getView())()`

**This method is deprecated.**
`final int` `[hashCode](https://developer.android.com/reference/android/app/Fragment.html#hashCode())()`

**This method is deprecated.**
`static https://developer.android.com/reference/android/app/Fragment.html` `[instantiate](https://developer.android.com/reference/android/app/Fragment.html#instantiate(android.content.Context, java.lang.String))(https://developer.android.com/reference/android/content/Context.html context, https://developer.android.com/reference/java/lang/String.html fname)`

**This method is deprecated.**
`final boolean` `[isAdded](https://developer.android.com/reference/android/app/Fragment.html#isAdded())()`

**This method is deprecated.**
`final boolean` `[isDetached](https://developer.android.com/reference/android/app/Fragment.html#isDetached())()`

**This method is deprecated.**
`final boolean` `[isHidden](https://developer.android.com/reference/android/app/Fragment.html#isHidden())()`

**This method is deprecated.**
`final boolean` `[isInLayout](https://developer.android.com/reference/android/app/Fragment.html#isInLayout())()`

**This method is deprecated.**
`final boolean` `[isRemoving](https://developer.android.com/reference/android/app/Fragment.html#isRemoving())()`

**This method is deprecated.**
`final boolean` `[isResumed](https://developer.android.com/reference/android/app/Fragment.html#isResumed())()`

**This method is deprecated.**
`final boolean` `[isStateSaved](https://developer.android.com/reference/android/app/Fragment.html#isStateSaved())()`

**This method is deprecated.**
`final boolean` `[isVisible](https://developer.android.com/reference/android/app/Fragment.html#isVisible())()`

**This method is deprecated.**
`void` `[onActivityCreated](https://developer.android.com/reference/android/app/Fragment.html#onActivityCreated(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[onActivityResult](https://developer.android.com/reference/android/app/Fragment.html#onActivityResult(int, int, android.content.Intent))(int requestCode, int resultCode, https://developer.android.com/reference/android/content/Intent.html data)`

**This method is deprecated.**
`void` `[onAttach](https://developer.android.com/reference/android/app/Fragment.html#onAttach(android.app.Activity))(https://developer.android.com/reference/android/app/Activity.html activity)`

**This method is deprecated.**
`void` `[onAttachFragment](https://developer.android.com/reference/android/app/Fragment.html#onAttachFragment(android.app.Fragment))(https://developer.android.com/reference/android/app/Fragment.html childFragment)`

**This method is deprecated.**
`void` `[onConfigurationChanged](https://developer.android.com/reference/android/app/Fragment.html#onConfigurationChanged(android.content.res.Configuration))(https://developer.android.com/reference/android/content/res/Configuration.html newConfig)`

**This method is deprecated.**
`boolean` `[onContextItemSelected](https://developer.android.com/reference/android/app/Fragment.html#onContextItemSelected(android.view.MenuItem))(https://developer.android.com/reference/android/view/MenuItem.html item)`

**This method is deprecated.**
`void` `[onCreate](https://developer.android.com/reference/android/app/Fragment.html#onCreate(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`https://developer.android.com/reference/android/animation/Animator.html` `[onCreateAnimator](https://developer.android.com/reference/android/app/Fragment.html#onCreateAnimator(int, boolean, int))(int transit, boolean enter, int nextAnim)`

**This method is deprecated.**
`void` `[onCreateContextMenu](https://developer.android.com/reference/android/app/Fragment.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo))(
https://developer.android.com/reference/android/view/ContextMenu.html menu,
https://developer.android.com/reference/android/view/View.html v,
https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html menuInfo
)`

**This method is deprecated.**
`void` `[onCreateOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater))(https://developer.android.com/reference/android/view/Menu.html menu, https://developer.android.com/reference/android/view/MenuInflater.html inflater)`

**This method is deprecated.**
`void` `[onDestroy](https://developer.android.com/reference/android/app/Fragment.html#onDestroy())()`

**This method is deprecated.**
`void` `[onDestroyOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onDestroyOptionsMenu())()`

**This method is deprecated.**
`void` `[onDestroyView](https://developer.android.com/reference/android/app/Fragment.html#onDestroyView())()`

**This method is deprecated.**
`void` `[onDetach](https://developer.android.com/reference/android/app/Fragment.html#onDetach())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/view/LayoutInflater.html` `[onGetLayoutInflater](https://developer.android.com/reference/android/app/Fragment.html#onGetLayoutInflater(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[onHiddenChanged](https://developer.android.com/reference/android/app/Fragment.html#onHiddenChanged(boolean))(boolean hidden)`

**This method is deprecated.**
`void` `[onInflate](https://developer.android.com/reference/android/app/Fragment.html#onInflate(android.app.Activity, android.util.AttributeSet, android.os.Bundle))(
https://developer.android.com/reference/android/app/Activity.html activity,
https://developer.android.com/reference/android/util/AttributeSet.html attrs,
https://developer.android.com/reference/android/os/Bundle.html savedInstanceState
)`

**This method is deprecated.**
`void` `[onLowMemory](https://developer.android.com/reference/android/app/Fragment.html#onLowMemory())()`

**This method is deprecated.**
`void` `[onMultiWindowModeChanged](https://developer.android.com/reference/android/app/Fragment.html#onMultiWindowModeChanged(boolean))(boolean isInMultiWindowMode)`

**This method is deprecated.**
`boolean` `[onOptionsItemSelected](https://developer.android.com/reference/android/app/Fragment.html#onOptionsItemSelected(android.view.MenuItem))(https://developer.android.com/reference/android/view/MenuItem.html item)`

**This method is deprecated.**
`void` `[onOptionsMenuClosed](https://developer.android.com/reference/android/app/Fragment.html#onOptionsMenuClosed(android.view.Menu))(https://developer.android.com/reference/android/view/Menu.html menu)`

**This method is deprecated.**
`void` `[onPause](https://developer.android.com/reference/android/app/Fragment.html#onPause())()`

**This method is deprecated.**
`void` `[onPictureInPictureModeChanged](https://developer.android.com/reference/android/app/Fragment.html#onPictureInPictureModeChanged(boolean))(boolean isInPictureInPictureMode)`

**This method is deprecated.**
`void` `[onPrepareOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onPrepareOptionsMenu(android.view.Menu))(https://developer.android.com/reference/android/view/Menu.html menu)`

**This method is deprecated.**
`void` `[onRequestPermissionsResult](https://developer.android.com/reference/android/app/Fragment.html#onRequestPermissionsResult(int, java.lang.String[], int[]))(
int requestCode,
String[] permissions,
int[] grantResults
)`

**This method is deprecated.**
`void` `[onResume](https://developer.android.com/reference/android/app/Fragment.html#onResume())()`

**This method is deprecated.**
`void` `[onSaveInstanceState](https://developer.android.com/reference/android/app/Fragment.html#onSaveInstanceState(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html outState)`

**This method is deprecated.**
`void` `[onStart](https://developer.android.com/reference/android/app/Fragment.html#onStart())()`

**This method is deprecated.**
`void` `[onStop](https://developer.android.com/reference/android/app/Fragment.html#onStop())()`

**This method is deprecated.**
`void` `[onTrimMemory](https://developer.android.com/reference/android/app/Fragment.html#onTrimMemory(int))(int level)`

**This method is deprecated.**
`void` `[onViewCreated](https://developer.android.com/reference/android/app/Fragment.html#onViewCreated(android.view.View, android.os.Bundle))(https://developer.android.com/reference/android/view/View.html view, https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[onViewStateRestored](https://developer.android.com/reference/android/app/Fragment.html#onViewStateRestored(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html savedInstanceState)`

**This method is deprecated.**
`void` `[postponeEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#postponeEnterTransition())()`

**This method is deprecated.**
`void` `[registerForContextMenu](https://developer.android.com/reference/android/app/Fragment.html#registerForContextMenu(android.view.View))(https://developer.android.com/reference/android/view/View.html view)`

**This method is deprecated.**
`final void` `[requestPermissions](https://developer.android.com/reference/android/app/Fragment.html#requestPermissions(java.lang.String[], int))(String[] permissions, int requestCode)`

**This method is deprecated.**
`void` `[setAllowEnterTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#setAllowEnterTransitionOverlap(boolean))(boolean allow)`

**This method is deprecated.**
`void` `[setAllowReturnTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#setAllowReturnTransitionOverlap(boolean))(boolean allow)`

**This method is deprecated.**
`void` `[setArguments](https://developer.android.com/reference/android/app/Fragment.html#setArguments(android.os.Bundle))(https://developer.android.com/reference/android/os/Bundle.html args)`

**This method is deprecated.**
`void` `[setEnterSharedElementCallback](https://developer.android.com/reference/android/app/Fragment.html#setEnterSharedElementCallback(android.app.SharedElementCallback))(https://developer.android.com/reference/android/app/SharedElementCallback.html callback)`

**This method is deprecated.**
`void` `[setEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#setEnterTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setExitSharedElementCallback](https://developer.android.com/reference/android/app/Fragment.html#setExitSharedElementCallback(android.app.SharedElementCallback))(https://developer.android.com/reference/android/app/SharedElementCallback.html callback)`

**This method is deprecated.**
`void` `[setExitTransition](https://developer.android.com/reference/android/app/Fragment.html#setExitTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setHasOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#setHasOptionsMenu(boolean))(boolean hasMenu)`

**This method is deprecated.**
`void` `[setInitialSavedState](https://developer.android.com/reference/android/app/Fragment.html#setInitialSavedState(android.app.Fragment.SavedState))(https://developer.android.com/reference/android/app/Fragment.SavedState.html state)`

**This method is deprecated.**
`void` `[setMenuVisibility](https://developer.android.com/reference/android/app/Fragment.html#setMenuVisibility(boolean))(boolean menuVisible)`

**This method is deprecated.**
`void` `[setReenterTransition](https://developer.android.com/reference/android/app/Fragment.html#setReenterTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setRetainInstance](https://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean))(boolean retain)`

**This method is deprecated.**
`void` `[setReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#setReturnTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setSharedElementEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#setSharedElementEnterTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setSharedElementReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#setSharedElementReturnTransition(android.transition.Transition))(https://developer.android.com/reference/android/transition/Transition.html transition)`

**This method is deprecated.**
`void` `[setTargetFragment](https://developer.android.com/reference/android/app/Fragment.html#setTargetFragment(android.app.Fragment, int))(https://developer.android.com/reference/android/app/Fragment.html fragment, int requestCode)`

**This method is deprecated.**
`void` `[setUserVisibleHint](https://developer.android.com/reference/android/app/Fragment.html#setUserVisibleHint(boolean))(boolean isVisibleToUser)`

**This method is deprecated.**
`boolean` `[shouldShowRequestPermissionRationale](https://developer.android.com/reference/android/app/Fragment.html#shouldShowRequestPermissionRationale(java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission)`

**This method is deprecated.**
`void` `[startActivity](https://developer.android.com/reference/android/app/Fragment.html#startActivity(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.**
`void` `[startActivityForResult](https://developer.android.com/reference/android/app/Fragment.html#startActivityForResult(android.content.Intent, int))(https://developer.android.com/reference/android/content/Intent.html intent, int requestCode)`

**This method is deprecated.**
`void` `[startIntentSenderForResult](https://developer.android.com/reference/android/app/Fragment.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle))(
https://developer.android.com/reference/android/content/IntentSender.html intent,
int requestCode,
https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags,
https://developer.android.com/reference/android/os/Bundle.html options
)`

**This method is deprecated.**
`void` `[startPostponedEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#startPostponedEnterTransition())()`

**This method is deprecated.**
`https://developer.android.com/reference/java/lang/String.html` `[toString](https://developer.android.com/reference/android/app/Fragment.html#toString())()`

**This method is deprecated.**
`void` `[unregisterForContextMenu](https://developer.android.com/reference/android/app/Fragment.html#unregisterForContextMenu(android.view.View))(https://developer.android.com/reference/android/view/View.html view)`

**This method is deprecated.**

## Public constructors

### ErrorFragment

Added in 1.1.0 Deprecated in 1.1.0

```
public [ErrorFragment](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#ErrorFragment())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

## Public methods

### getBackgroundDrawable

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable Drawable [getBackgroundDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getBackgroundDrawable())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the background drawable. May be null if a default is used.

### getButtonClickListener

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable View.OnClickListener [getButtonClickListener](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getButtonClickListener())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the button click listener.

### getButtonText

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable String [getButtonText](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getButtonText())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the button text.

### getImageDrawable

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable Drawable [getImageDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getImageDrawable())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the drawable used for the error image.

### getMessage

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable CharSequence [getMessage](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#getMessage())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the error message.

### isBackgroundTranslucent

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public boolean [isBackgroundTranslucent](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#isBackgroundTranslucent())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns true if the background is translucent.

### onCreateView

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public @Nullable View [onCreateView](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))(
    LayoutInflater inflater,
    @Nullable ViewGroup container,
    Bundle savedInstanceState
)
```

> [!CAUTION]
> **This method is deprecated.**   

### onStart

```
public void [onStart](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#onStart())()
```

> [!CAUTION]
> **This method is deprecated.**   

### setBackgroundDrawable

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public void [setBackgroundDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setBackgroundDrawable(android.graphics.drawable.Drawable))(@Nullable Drawable drawable)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets a drawable for the fragment background.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The drawable used for the background. |

### setButtonClickListener

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public void [setButtonClickListener](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setButtonClickListener(android.view.View.OnClickListener))(@Nullable View.OnClickListener clickListener)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Set the button click listener.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/View.OnClickListener.html clickListener` | The click listener for the button. |

### setButtonText

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public void [setButtonText](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setButtonText(java.lang.String))(@Nullable String text)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the button text.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html text` | The button text. |

### setDefaultBackground

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public void [setDefaultBackground](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setDefaultBackground(boolean))(boolean translucent)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the default background.

| Parameters |
|---|---|
| `boolean translucent` | True to set a translucent background. |

### setImageDrawable

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public void [setImageDrawable](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setImageDrawable(android.graphics.drawable.Drawable))(@Nullable Drawable drawable)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the drawable to be used for the error image.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The drawable used for the error image. |

### setMessage

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public void [setMessage](https://developer.android.com/reference/androidx/leanback/app/ErrorFragment#setMessage(java.lang.CharSequence))(@Nullable CharSequence message)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Sets the error message.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html message` | The error message. |