MultiActionsProvider.MultiAction

class MultiActionsProvider.MultiAction


MultiAction represents an action that can have multiple states. getIndex returns the current index within the drawables. Both list of drawables and index can be updated dynamically in the program, and the UI could be updated by notifying the listeners provided in AbstractMediaItemPresenter.ViewHolder.

Summary

Public constructors

Public functions

Drawable!
Array<Drawable!>!

Returns the drawables used for displaying different states within this MultiAction.

Long
Int

Returns the currently selected index in this MultiAction.

Unit

Increments the index which this MultiAction currently represents.

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

Sets the drawables used for displaying different states within this MultiAction.

Unit
setIndex(index: Int)

Sets the index which this MultiAction currently represents.

Public constructors

MultiAction

Added in 1.1.0
MultiAction(id: Long)

Public functions

getCurrentDrawable

Added in 1.1.0
fun getCurrentDrawable(): Drawable!
Returns
Drawable!

The icon drawable for the current state of this MultiAction.

getDrawables

Added in 1.1.0
fun getDrawables(): Array<Drawable!>!

Returns the drawables used for displaying different states within this MultiAction.

Returns
Array<Drawable!>!

The drawables used for displaying different states within this MultiAction.

getId

Added in 1.1.0
fun getId(): Long
Returns
Long

The id for this MultiAction.

getIndex

Added in 1.1.0
fun getIndex(): Int

Returns the currently selected index in this MultiAction.

Returns
Int

The currently selected index in this MultiAction.

incrementIndex

Added in 1.1.0
fun incrementIndex(): Unit

Increments the index which this MultiAction currently represents. The index is wrapped around to zero when the end is reached.

setDrawables

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

Sets the drawables used for displaying different states within this MultiAction. The size of drawables determines the set of states this action represents.

Parameters
drawables: Array<Drawable!>!

Array of drawables for different MultiAction states.

setIndex

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

Sets the index which this MultiAction currently represents.

Parameters
index: Int

The current action index.