Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 24.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

MultiActionsProvider.MultiAction

public static class MultiActionsProvider.MultiAction
extends Object

java.lang.Object
   ↳ android.support.v17.leanback.widget.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

MultiActionsProvider.MultiAction(long id)

Public methods

Drawable getCurrentDrawable()
Drawable[] getDrawables()

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

long getId()
int getIndex()

Returns the currently selected index in this MultiAction.

void incrementIndex()

Increments the index which this MultiAction currently represents.

void setDrawables(Drawable[] drawables)

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

void setIndex(int index)

Sets the index which this MultiAction currently represents.

Inherited methods

From class java.lang.Object

Public constructors

MultiActionsProvider.MultiAction

added in version 24.1.0
MultiActionsProvider.MultiAction (long id)

Parameters
id long

Public methods

getCurrentDrawable

added in version 24.1.0
Drawable getCurrentDrawable ()

Returns
Drawable The icon drawable for the current state of this MultiAction.

getDrawables

added in version 24.1.0
Drawable[] getDrawables ()

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

Returns
Drawable[] The drawables used for displaying different states within this MultiActionsProvider.MultiAction.

getId

added in version 24.1.0
long getId ()

Returns
long The id for this MultiAction.

getIndex

added in version 24.1.0
int getIndex ()

Returns the currently selected index in this MultiAction.

Returns
int The currently selected index in this MultiAction.

incrementIndex

added in version 24.1.0
void incrementIndex ()

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

setDrawables

added in version 24.1.0
void setDrawables (Drawable[] drawables)

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

Parameters
drawables Drawable: Array of drawables for different MultiAction states.

setIndex

added in version 24.1.0
void setIndex (int index)

Sets the index which this MultiAction currently represents.

Parameters
index int: The current action index.