Google is committed to advancing racial equity for Black communities. See how.

ErrorFragment

open class ErrorFragment : BrandedFragment
kotlin.Any
   ↳ android.app.Fragment
   ↳ androidx.leanback.app.BrandedFragment
   ↳ androidx.leanback.app.ErrorFragment

A fragment for displaying an error indication.

Summary

Public constructors

A fragment for displaying an error indication.

Public methods
open Drawable!

Returns the background drawable.

open OnClickListener!

Returns the button click listener.

open String!

Returns the button text.

open Drawable!

Returns the drawable used for the error image.

open CharSequence!

Returns the error message.

open Boolean

Returns true if the background is translucent.

open View?
onCreateView(inflater: LayoutInflater!, container: ViewGroup?, savedInstanceState: Bundle!)

open Unit

open Unit

Sets a drawable for the fragment background.

open Unit

Set the button click listener.

open Unit

Sets the button text.

open Unit

Sets the default background.

open Unit

Sets the drawable to be used for the error image.

open Unit

Sets the error message.

Inherited functions

Public constructors

<init>

ErrorFragment()

Deprecated: use ErrorSupportFragment

A fragment for displaying an error indication.

Public methods

getBackgroundDrawable

open fun getBackgroundDrawable(): Drawable!

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

getButtonClickListener

open fun getButtonClickListener(): OnClickListener!

Returns the button click listener.

getButtonText

open fun getButtonText(): String!

Returns the button text.

getImageDrawable

open fun getImageDrawable(): Drawable!

Returns the drawable used for the error image.

getMessage

open fun getMessage(): CharSequence!

Returns the error message.

isBackgroundTranslucent

open fun isBackgroundTranslucent(): Boolean

Returns true if the background is translucent.

onCreateView

open fun onCreateView(
    inflater: LayoutInflater!,
    container: ViewGroup?,
    savedInstanceState: Bundle!
): View?

onStart

open fun onStart(): Unit

setBackgroundDrawable

open fun setBackgroundDrawable(drawable: Drawable!): Unit

Sets a drawable for the fragment background.

Parameters
drawable Drawable!: The drawable used for the background.

setButtonClickListener

open fun setButtonClickListener(clickListener: OnClickListener!)