Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

ErrorSupportFragment

open class ErrorSupportFragment : BrandedSupportFragment
kotlin.Any
   ↳ androidx.fragment.app.Fragment
   ↳ androidx.leanback.app.BrandedSupportFragment
   ↳ androidx.leanback.app.ErrorSupportFragment

A fragment for displaying an error indication.

Summary

Public constructors

A fragment for displaying an error indication.

Public methods
open CharSequence!

Returns the error message.

open Unit

Sets the button text.

open Unit

Sets the error message.

open Boolean

Returns true if the background is translucent.

open Drawable!

Returns the background drawable.

open Unit

Set the button click listener.

open Unit

Sets the drawable to be used for the error image.

open Drawable!

Returns the drawable used for the error image.

open Unit

Sets a drawable for the fragment background.

open OnClickListener!

Returns the button click listener.

open Unit

Sets the default background.

open Unit

open String!

Returns the button text.

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

Inherited functions

Public constructors

<init>

ErrorSupportFragment()

A fragment for displaying an error indication.

Public methods

getMessage

open fun getMessage(): CharSequence!

Returns the error message.

setButtonText

open fun setButtonText(text: String!): Unit

Sets the button text.

Parameters
text String!: The button text.

setMessage

open fun setMessage(message: CharSequence!): Unit

Sets the error message.

Parameters
message CharSequence!: The error message.

isBackgroundTranslucent

open fun isBackgroundTranslucent(): Boolean

Returns true if the background is translucent.

getBackgroundDrawable

open fun getBackgroundDrawable(): Drawable!

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

setButtonClickListener

open fun setButtonClickListener(clickListener: OnClickListener!): Unit

Set the button click listener.

Parameters
clickListener OnClickListener!: The click listener for the button.

setImageDrawable

open fun setImageDrawable(drawable: Drawable!): Unit

Sets the drawable to be used for the error image.

Parameters
drawable Drawable!: The drawable used for the error image.

getImageDrawable

open fun getImageDrawable(): Drawable!

Returns the drawable used for the error image.

setBackgroundDrawable

open fun setBackgroundDrawable(drawable: Drawable!): Unit

Sets a drawable for the fragment background.

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

getButtonClickListener

open fun getButtonClickListener(): OnClickListener!

Returns the button click listener.

setDefaultBackground

open fun setDefaultBackground(translucent: Boolean): Unit

Sets the default background.

Parameters
translucent Boolean: True to set a translucent background.

onStart

open fun onStart(): Unit

getButtonText

open fun getButtonText(): String!

Returns the button text.

onCreateView

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