ErrorFragment
public class ErrorFragment extends BrandedFragment
| java.lang.Object | |||
| ↳ | android.app.Fragment | ||
| ↳ | androidx.leanback.app.BrandedFragment | ||
| ↳ | androidx.leanback.app.ErrorFragment |
A fragment for displaying an error indication.
Summary
Public constructors |
|---|
Public methods |
|
|---|---|
@Nullable Drawable |
Returns the background drawable. |
@Nullable View.OnClickListener |
Returns the button click listener. |
@Nullable String |
Returns the button text. |
@Nullable Drawable |
Returns the drawable used for the error image. |
@Nullable CharSequence |
Returns the error message. |
boolean |
Returns true if the background is translucent. |
@Nullable View |
This method is deprecated. |
void |
This method is deprecated. |
void |
Sets a drawable for the fragment background. |
void |
Set the button click listener. |
void |
Sets the button text. |
void |
Sets the default background. |
void |
Sets the drawable to be used for the error image. |
void |
Sets the error message. |
Inherited Constants |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited methods |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Public constructors
Public methods
public @Nullable DrawablegetBackgroundDrawable()
Returns the background drawable. May be null if a default is used.
public @Nullable ViewonCreateView(
LayoutInflater inflater,
@Nullable ViewGroup container,
Bundle savedInstanceState
)
public voidsetBackgroundDrawable(@Nullable Drawable drawable)
Sets a drawable for the fragment background.
public voidsetButtonClickListener(@Nullable View.OnClickListener clickListener)
Set the button click listener.
| Parameters | |
|---|---|
@Nullable View.OnClickListener clickListener |
The click listener for the button. |
public void setDefaultBackground(boolean translucent)Sets the default background.
| Parameters | |
|---|---|
boolean translucent |
True to set a translucent background. |
public voidsetImageDrawable(@Nullable Drawable drawable)
Sets the drawable to be used for the error image.
public voidsetMessage(@Nullable CharSequence message)
Sets the error message.
| Parameters | |
|---|---|
@Nullable CharSequence message |
The error message. |