class CommandButton : Bundleable


A button for a SessionCommand or Player.Command that can be displayed by controllers.

Summary

Nested types

A builder for CommandButton.

Constants

const Bundleable.Creator<CommandButton!>!

This property is deprecated.

Use fromBundle instead.

Public functions

Boolean
equals(obj: Any?)

Checks the given command button for equality while ignoring extras.

java-static CommandButton!

Restores a CommandButton from a Bundle.

Int
Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

CharSequence!

The display name of the button.

Bundle!

The extra Bundle of the button.

@DrawableRes Int

The icon resource id of the button.

Uri?

The Uri for the icon of the button.

Boolean

Whether it's enabled.

Int

The Player.Command command of the button.

SessionCommand?

The session command of the button.

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<CommandButton!>!

Object that can restore CommandButton from a Bundle.

Public functions

equals

fun equals(obj: Any?): Boolean

Checks the given command button for equality while ignoring extras.

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): CommandButton!

Restores a CommandButton from a Bundle.

hashCode

fun hashCode(): Int

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

displayName

val displayNameCharSequence!

The display name of the button. Can be empty if the command is predefined and a custom name isn't needed.

extras

@UnstableApi
val extrasBundle!

The extra Bundle of the button. It's private information between session and controller.

iconResId

val iconResId: @DrawableRes Int

The icon resource id of the button. Can be 0 if the command is predefined and a custom icon isn't needed.

iconUri

@UnstableApi
val iconUriUri?

The Uri for the icon of the button. Can be null.

isEnabled

val isEnabledBoolean

Whether it's enabled.

playerCommand

@Player.Command
val playerCommandInt

The Player.Command command of the button. Will be COMMAND_INVALID if sessionCommand is set.

sessionCommand

val sessionCommandSessionCommand?

The session command of the button. Will be null if playerCommand is set.