Action
open class Action
kotlin.Any | |
↳ | androidx.leanback.widget.Action |
An action contains one or two lines of text, an optional image and an optional id. It may also be invoked by one or more keycodes.
Summary
Constants | |
---|---|
static Long |
Indicates that an id has not been set. |
Public constructors | |
---|---|
Constructor for an Action. |
|
<init>(id: Long, label: CharSequence!) Constructor for an Action. |
|
<init>(id: Long, label1: CharSequence!, label2: CharSequence!) Constructor for an Action. |
|
<init>(id: Long, label1: CharSequence!, label2: CharSequence!, icon: Drawable!) Constructor for an Action. |
Public methods | |
---|---|
Unit |
addKeyCode(keyCode: Int) Adds a keycode used to invoke this Action. |
Drawable! |
getIcon() Returns the icon drawable for this Action. |
Long |
getId() Returns the id for this Action. |
CharSequence! |
Returns the first line label for this Action. |
CharSequence! |
Returns the second line label for this Action. |
Unit |
removeKeyCode(keyCode: Int) Removes a keycode used to invoke this Action. |
Boolean |
respondsToKeyCode(keyCode: Int) Returns true if the Action should respond to the given keycode. |
Unit |
Sets the icon drawable for this Action. |
Unit |
Sets the id for this Action. |
Unit |
setLabel1(label: CharSequence!) Sets the first line label for this Action. |
Unit |
setLabel2(label: CharSequence!) Sets the second line label for this Action. |
open String |
toString() |