public class PlaybackControlsRow extends Row
Row
of playback controls to be displayed by a PlaybackControlsRowPresenter
.
This row consists of some optional item detail, a series of primary actions,
and an optional series of secondary actions.
Controls are specified via an ObjectAdapter
containing one or more
Action
s.
Adapters should have their PresenterSelector
set to an instance of
ControlButtonPresenterSelector
.
Modifier and Type | Class and Description |
---|---|
static class |
PlaybackControlsRow.ClosedCaptioningAction
An action for displaying a CC (Closed Captioning) icon.
|
static class |
PlaybackControlsRow.FastForwardAction
An action displaying an icon for fast forward.
|
static class |
PlaybackControlsRow.HighQualityAction
An action for displaying a HQ (High Quality) icon.
|
static class |
PlaybackControlsRow.MoreActions
An action displaying an icon for "more actions".
|
static class |
PlaybackControlsRow.MultiAction
Base class for an action comprised of a series of icons.
|
static class |
PlaybackControlsRow.PictureInPictureAction
An action displaying an icon for picture-in-picture.
|
static class |
PlaybackControlsRow.PlayPauseAction
An action displaying icons for play and pause.
|
static class |
PlaybackControlsRow.RepeatAction
An action for displaying three repeat states: none, one, or all.
|
static class |
PlaybackControlsRow.RewindAction
An action displaying an icon for rewind.
|
static class |
PlaybackControlsRow.ShuffleAction
An action for displaying a shuffle icon.
|
static class |
PlaybackControlsRow.SkipNextAction
An action displaying an icon for skip next.
|
static class |
PlaybackControlsRow.SkipPreviousAction
An action displaying an icon for skip previous.
|
static class |
PlaybackControlsRow.ThumbsAction
A base class for displaying a thumbs action.
|
static class |
PlaybackControlsRow.ThumbsDownAction
An action displaying an icon for thumbs down.
|
static class |
PlaybackControlsRow.ThumbsUpAction
An action displaying an icon for thumbs up.
|
Constructor and Description |
---|
PlaybackControlsRow()
Constructor for a PlaybackControlsRow that has no item details.
|
PlaybackControlsRow(Object item)
Constructor for a PlaybackControlsRow that displays some details from
the given item.
|
Modifier and Type | Method and Description |
---|---|
Action |
getActionForKeyCode(int keyCode)
Returns the Action associated with the given keycode, or null if no associated action exists.
|
Action |
getActionForKeyCode(ObjectAdapter adapter,
int keyCode)
Returns the Action associated with the given keycode, or null if no associated action exists.
|
int |
getBufferedProgress()
Returns the buffered progress for the playback controls row.
|
int |
getCurrentTime()
Returns the current time in milliseconds for the playback controls row.
|
Drawable |
getImageDrawable()
Returns the image
Drawable of this row. |
Object |
getItem()
Returns the main item for the details page.
|
ObjectAdapter |
getPrimaryActionsAdapter()
Returns the primary actions
ObjectAdapter . |
ObjectAdapter |
getSecondaryActionsAdapter()
Returns the secondary actions
ObjectAdapter . |
int |
getTotalTime()
Returns the total time in milliseconds for the playback controls row.
|
void |
setBufferedProgress(int ms)
Sets the buffered progress for the playback controls row.
|
void |
setCurrentTime(int ms)
Sets the current time in milliseconds for the playback controls row.
|
void |
setImageBitmap(Context context,
Bitmap bm)
Sets a
Bitmap for this row. |
void |
setImageDrawable(Drawable drawable)
Sets a {link @Drawable} image for this row.
|
void |
setPrimaryActionsAdapter(ObjectAdapter adapter)
Sets the primary actions
ObjectAdapter . |
void |
setSecondaryActionsAdapter(ObjectAdapter adapter)
Sets the secondary actions
ObjectAdapter . |
void |
setTotalTime(int ms)
Sets the total time in milliseconds for the playback controls row.
|
getHeaderItem, getId, isRenderedAsRowView, setHeaderItem, setId
public PlaybackControlsRow(Object item)
item
- The main item for the row.public PlaybackControlsRow()
public final Object getItem()
public final void setImageDrawable(Drawable drawable)
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
drawable
- The drawable to set.public final void setImageBitmap(Context context, Bitmap bm)
Bitmap
for this row.
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
context
- The context to retrieve display metrics from.bm
- The bitmap to set.public final Drawable getImageDrawable()
Drawable
of this row.public final void setPrimaryActionsAdapter(ObjectAdapter adapter)
ObjectAdapter
.
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
public final void setSecondaryActionsAdapter(ObjectAdapter adapter)
ObjectAdapter
.
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
public final ObjectAdapter getPrimaryActionsAdapter()
ObjectAdapter
.public final ObjectAdapter getSecondaryActionsAdapter()
ObjectAdapter
.public void setTotalTime(int ms)
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
public int getTotalTime()
public void setCurrentTime(int ms)
public int getCurrentTime()
public void setBufferedProgress(int ms)
public int getBufferedProgress()
public Action getActionForKeyCode(int keyCode)
public Action getActionForKeyCode(ObjectAdapter adapter, int keyCode)