RepeatMediaControl

A control to switch between queue playback repeat modes.

Constructors

Link copied to clipboard
constructor(context: MediaControlContext)

Types

Link copied to clipboard

Creates a RepeatMediaControl, to change repeat mode.

Properties

Link copied to clipboard
open override val drawable: LiveData<DrawableResolver?>

The icon of the control, which is used to represent the control to the user.

Link copied to clipboard
open override val isActivated: LiveData<Boolean>

The action is activated when one or more activatedAction are present in the context.

Link copied to clipboard
open override val isAvailable: LiveData<Boolean>

The action is available if activatedAction or activateAction are present in the context.

Link copied to clipboard
open override val tag: Int

Int resource ID to tag this MediaControl with. The tag can be used in tests to refer to one or more controls with the same tag.

Inherited properties

Link copied to clipboard
open val actionType: TtButton.ActionType

The type of the control, which is used by TtButton to apply one of the predefined styles. May be overridden in subclasses in order to apply a specialized style. TtButton.ActionType.TERTIARY is used by default as the most neutral option.

Link copied to clipboard

Whether the control is visible. This can be used to show the control as disabled. Defaults to isAvailable.

Link copied to clipboard
open val text: LiveData<StringResolver>

Textual description of the control.

Functions

Link copied to clipboard
open override fun toAction(): Action

Convert this ActionMediaControl to an Action to launch it. The IVI media service uses Action objects to issue commands to media sources.

Inherited functions

Link copied to clipboard
open fun asIconTtButtonViewModel(): LiveData<TtButtonViewModel>

Creates a TtButtonViewModel representation of this MediaControl as an icon button. This implies only the drawable is included.

Link copied to clipboard
open override fun launch(): Boolean

Launch this action using the current action context. The Action, determined by toAction, is performed using the current context. If the action is not currently available, the operation will fail.