PlaybackControlsRow.MultiAction

abstract class PlaybackControlsRow.MultiAction : Action

Known direct subclasses
PlaybackControlsRow.ClosedCaptioningAction

An action for displaying a CC (Closed Captioning) icon.

PlaybackControlsRow.FastForwardAction

An action displaying an icon for fast forward.

PlaybackControlsRow.HighQualityAction

An action for displaying a HQ (High Quality) icon.

PlaybackControlsRow.PlayPauseAction

An action displaying icons for play and pause.

PlaybackControlsRow.RepeatAction

An action for displaying three repeat states: none, one, or all.

PlaybackControlsRow.RewindAction

An action displaying an icon for rewind.

PlaybackControlsRow.ShuffleAction

An action for displaying a shuffle icon.

PlaybackControlsRow.ThumbsAction

A base class for displaying a thumbs action.

Known indirect subclasses
PlaybackControlsRow.ThumbsDownAction

An action displaying an icon for thumbs down.

PlaybackControlsRow.ThumbsUpAction

An action displaying an icon for thumbs up.


Base class for an action comprised of a series of icons.

Summary

Public constructors

Constructor

Public functions

Int

Returns the number of actions.

Drawable!
getDrawable(index: Int)

Returns the drawable at the given index.

Int

Returns the current index.

String!
getLabel(index: Int)

Returns the label at the given index.

String!

Returns the secondary label at the given index.

Unit

Increments the index, wrapping to zero once the end is reached.

Unit
setDrawables(drawables: Array<Drawable!>!)

Sets the array of drawables.

Unit
setIndex(index: Int)

Sets the current index.

Unit
setLabels(labels: Array<String!>!)

Sets the array of strings used as labels.

Unit

Sets the array of strings used as secondary labels.

Inherited Constants

From androidx.leanback.widget.Action
const Long
NO_ID = -1

Indicates that an id has not been set.

Inherited functions

From androidx.leanback.widget.Action
Unit
addKeyCode(keyCode: Int)

Adds a keycode used to invoke this Action.

Drawable?

Returns the icon drawable for this Action.

Long

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

Returns true if the Action should respond to the given keycode.

Unit
setIcon(icon: Drawable?)

Sets the icon drawable for this Action.

Unit
setId(id: Long)

Sets the id for this Action.

Unit

Sets the first line label for this Action.

Unit

Sets the second line label for this Action.

String

Public constructors

MultiAction

Added in 1.1.0
MultiAction(id: Int)

Constructor

Parameters
id: Int

The id of the Action.

Public functions

getActionCount

Added in 1.1.0
fun getActionCount(): Int

Returns the number of actions.

getDrawable

Added in 1.1.0
fun getDrawable(index: Int): Drawable!

Returns the drawable at the given index.

getIndex

Added in 1.1.0
fun getIndex(): Int

Returns the current index.

getLabel

Added in 1.1.0
fun getLabel(index: Int): String!

Returns the label at the given index.

getSecondaryLabel

Added in 1.1.0
fun getSecondaryLabel(index: Int): String!

Returns the secondary label at the given index.

nextIndex

Added in 1.1.0
fun nextIndex(): Unit

Increments the index, wrapping to zero once the end is reached.

setDrawables

Added in 1.1.0
fun setDrawables(drawables: Array<Drawable!>!): Unit

Sets the array of drawables. The size of the array defines the range of valid indices for this action.

setIndex

Added in 1.1.0
fun setIndex(index: Int): Unit

Sets the current index.

setLabels

Added in 1.1.0
fun setLabels(labels: Array<String!>!): Unit

Sets the array of strings used as labels. The size of the array defines the range of valid indices for this action. The labels are used to define the accessibility content description unless secondary labels are provided.

setSecondaryLabels

Added in 1.1.0
fun setSecondaryLabels(labels: Array<String!>!): Unit

Sets the array of strings used as secondary labels. These labels are used in place of the primary labels for accessibility content description only.