Android APIs
public class

PlaybackControlsRow

extends Row
java.lang.Object
   ↳ android.support.v17.leanback.widget.Row
     ↳ android.support.v17.leanback.widget.PlaybackControlsRow

Class Overview

A 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 Actions. Adapters should have their PresenterSelector set to an instance of ControlButtonPresenterSelector.

Summary

Nested Classes
class PlaybackControlsRow.ClosedCaptioningAction An action for displaying a CC (Closed Captioning) icon. 
class PlaybackControlsRow.FastForwardAction An action displaying an icon for fast forward. 
class PlaybackControlsRow.HighQualityAction An action for displaying a HQ (High Quality) icon. 
class PlaybackControlsRow.MoreActions An action displaying an icon for "more actions". 
class PlaybackControlsRow.MultiAction Base class for an action comprised of a series of icons. 
class PlaybackControlsRow.PlayPauseAction An action displaying icons for play and pause. 
class PlaybackControlsRow.RepeatAction An action for displaying three repeat states: none, one, or all. 
class PlaybackControlsRow.RewindAction An action displaying an icon for rewind. 
class PlaybackControlsRow.ShuffleAction An action for displaying a shuffle icon. 
class PlaybackControlsRow.SkipNextAction An action displaying an icon for skip next. 
class PlaybackControlsRow.SkipPreviousAction An action displaying an icon for skip previous. 
class PlaybackControlsRow.ThumbsAction A base class for displaying a thumbs action. 
class PlaybackControlsRow.ThumbsDownAction An action displaying an icon for thumbs down. 
class PlaybackControlsRow.ThumbsUpAction An action displaying an icon for thumbs up. 
Public Constructors
PlaybackControlsRow(Object item)
Constructor for a PlaybackControlsRow that displays some details from the given item.
PlaybackControlsRow()
Constructor for a PlaybackControlsRow that has no item details.
Public Methods
int getBufferedProgress()
Returns the buffered progress for the playback controls row.
int getCurrentTime()
Returns the current time in milliseconds for the playback controls row.
final Drawable getImageDrawable()
Gets the image Drawable of this row.
final Object getItem()
Gets the main item for the details page.
PlaybackControlsRow.OnPlaybackStateChangedListener getOnPlaybackStateChangedListener()
Returns the playback state listener.
final ObjectAdapter getPrimaryActionsAdapter()
Returns the primary actions ObjectAdapter.
final 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.
final void setImageBitmap(Context context, Bitmap bm)
Sets a Bitmap for this row.
final void setImageDrawable(Drawable drawable)
Sets a {link @Drawable} image for this row.
void setOnPlaybackStateChangedListener(PlaybackControlsRow.OnPlaybackStateChangedListener listener)
Sets a listener to be called when the playback state changes.
final void setPrimaryActionsAdapter(ObjectAdapter adapter)
Sets the primary actions ObjectAdapter.
final void setSecondaryActionsAdapter(ObjectAdapter adapter)
Sets the secondary actions ObjectAdapter.
void setTotalTime(int ms)
Sets the total time in milliseconds for the playback controls row.
[Expand]
Inherited Methods
From class android.support.v17.leanback.widget.Row
From class java.lang.Object

Public Constructors

public PlaybackControlsRow (Object item)

Constructor for a PlaybackControlsRow that displays some details from the given item.

Parameters
item The main item for the row.

public PlaybackControlsRow ()

Constructor for a PlaybackControlsRow that has no item details.

Public Methods

public int getBufferedProgress ()

Returns the buffered progress for the playback controls row.

public int getCurrentTime ()

Returns the current time in milliseconds for the playback controls row.

public final Drawable getImageDrawable ()

Gets the image Drawable of this row.

Returns
  • The overview's image drawable, or null if no drawable has been assigned.

public final Object getItem ()

Gets the main item for the details page.

public PlaybackControlsRow.OnPlaybackStateChangedListener getOnPlaybackStateChangedListener ()

Returns the playback state listener.

public final ObjectAdapter getPrimaryActionsAdapter ()

Returns the primary actions ObjectAdapter.

public final ObjectAdapter getSecondaryActionsAdapter ()

Returns the secondary actions ObjectAdapter.

public int getTotalTime ()

Returns the total time in milliseconds for the playback controls row.

public void setBufferedProgress (int ms)

Sets the buffered progress for the playback controls row.

public void setCurrentTime (int ms)

Sets the current time in milliseconds for the playback controls row.

public final void setImageBitmap (Context context, Bitmap bm)

Sets a Bitmap for this row.

Parameters
context The context to retrieve display metrics from.
bm The bitmap to set.

public final void setImageDrawable (Drawable drawable)

Sets a {link @Drawable} image for this row.

Parameters
drawable The drawable to set.

public void setOnPlaybackStateChangedListener (PlaybackControlsRow.OnPlaybackStateChangedListener listener)

Sets a listener to be called when the playback state changes.

public final void setPrimaryActionsAdapter (ObjectAdapter adapter)

Sets the primary actions ObjectAdapter.

public final void setSecondaryActionsAdapter (ObjectAdapter adapter)

Sets the secondary actions ObjectAdapter.

public void setTotalTime (int ms)

Sets the total time in milliseconds for the playback controls row.