PlaybackControlsRow.RepeatAction


class PlaybackControlsRow.RepeatAction : PlaybackControlsRow.MultiAction


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

Summary

Constants

const Int
ALL = 1

This property is deprecated.

Use INDEX_ALL

const Int

Action index for the repeat-all icon.

const Int

Action index for the repeat-none icon.

const Int

Action index for the repeat-one icon.

const Int
NONE = 0

This property is deprecated.

Use INDEX_NONE

const Int
ONE = 2

This property is deprecated.

Use INDEX_ONE

Public constructors

RepeatAction(context: Context!)

Constructor

RepeatAction(context: Context!, highlightColor: Int)

Constructor

RepeatAction(context: Context!, repeatAllColor: Int, repeatOneColor: Int)

Constructor

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
From androidx.leanback.widget.PlaybackControlsRow.MultiAction
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.

Constants

ALL

Added in 1.1.0
Deprecated in 1.1.0
const val ALL = 1: Int

Action index for the repeat-all icon.

INDEX_ALL

Added in 1.1.0
const val INDEX_ALL = 1: Int

Action index for the repeat-all icon.

INDEX_NONE

Added in 1.1.0
const val INDEX_NONE = 0: Int

Action index for the repeat-none icon.

INDEX_ONE

Added in 1.1.0
const val INDEX_ONE = 2: Int

Action index for the repeat-one icon.

NONE

Added in 1.1.0
Deprecated in 1.1.0
const val NONE = 0: Int

Action index for the repeat-none icon.

ONE

Added in 1.1.0
Deprecated in 1.1.0
const val ONE = 2: Int

Action index for the repeat-one icon.

Public constructors

RepeatAction

Added in 1.1.0
RepeatAction(context: Context!)

Constructor

Parameters
context: Context!

Context used for loading resources.

RepeatAction

Added in 1.1.0
RepeatAction(context: Context!, highlightColor: Int)

Constructor

Parameters
context: Context!

Context used for loading resources

highlightColor: Int

Color to display the repeat-all and repeat0one icons.

RepeatAction

Added in 1.1.0
RepeatAction(context: Context!, repeatAllColor: Int, repeatOneColor: Int)

Constructor

Parameters
context: Context!

Context used for loading resources

repeatAllColor: Int

Color to display the repeat-all icon.

repeatOneColor: Int

Color to display the repeat-one icon.