belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
PlaybackControlsRow
public
class
PlaybackControlsRow
extends Row
java.lang.Object | ||
↳ | android.support.v17.leanback.widget.Row | |
↳ | android.support.v17.leanback.widget.PlaybackControlsRow |
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
Action
s.
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.OnPlaybackProgressCallback
Listener for progress or duration change. |
class |
PlaybackControlsRow.PictureInPictureAction
An action displaying an icon for picture-in-picture. |
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 | |
---|---|
Action
|
getActionForKeyCode(ObjectAdapter adapter, int keyCode)
Returns the Action associated with the given keycode, or null if no associated action exists. |
Action
|
getActionForKeyCode(int keyCode)
Returns the Action associated with the given keycode, or null if no associated action exists. |
long
|
getBufferedPosition()
Returns the buffered progress of long type for the playback controls row. |
int
|
getBufferedProgress()
This method was deprecated
in API level 26.1.0.
Use |
long
|
getBufferedProgressLong()
This method was deprecated
in API level 26.1.0.
Use |
long
|
getCurrentPosition()
Returns the current time in milliseconds of long type for playback controls row. |
int
|
getCurrentTime()
This method was deprecated
in API level 26.1.0.
Use |
long
|
getCurrentTimeLong()
This method was deprecated
in API level 26.1.0.
Use |
long
|
getDuration()
Returns duration in milliseconds. |
final
Drawable
|
getImageDrawable()
Returns the image |
final
Object
|
getItem()
Returns the main item for the details page. |
final
ObjectAdapter
|
getPrimaryActionsAdapter()
Returns the primary actions |
final
ObjectAdapter
|
getSecondaryActionsAdapter()
Returns the secondary actions |
int
|
getTotalTime()
This method was deprecated
in API level 26.1.0.
use |
long
|
getTotalTimeLong()
This method was deprecated
in API level 26.1.0.
use |
void
|
setBufferedPosition(long ms)
Sets the buffered progress for the playback controls row. |
void
|
setBufferedProgress(int ms)
This method was deprecated
in API level 26.1.0.
Use |
void
|
setBufferedProgressLong(long ms)
This method was deprecated
in API level 26.1.0.
Use |
void
|
setCurrentPosition(long ms)
Sets the current time in milliseconds for the playback controls row. |
void
|
setCurrentTime(int ms)
This method was deprecated
in API level 26.1.0.
use |
void
|
setCurrentTimeLong(long ms)
This method was deprecated
in API level 26.1.0.
use |
void
|
setDuration(long ms)
Sets the total time in milliseconds (long type) for the playback controls row. |
final
void
|
setImageBitmap(Context context, Bitmap bm)
Sets a |
final
void
|
setImageDrawable(Drawable drawable)
Sets a {link @Drawable} image for this row. |
void
|
setOnPlaybackProgressChangedListener(PlaybackControlsRow.OnPlaybackProgressCallback listener)
Sets a listener to be called when the playback state changes. |
final
void
|
setPrimaryActionsAdapter(ObjectAdapter adapter)
Sets the primary actions |
final
void
|
setSecondaryActionsAdapter(ObjectAdapter adapter)
Sets the secondary actions |
void
|
setTotalTime(int ms)
This method was deprecated
in API level 26.1.0.
Use |
void
|
setTotalTimeLong(long ms)
This method was deprecated
in API level 26.1.0.
Use |
Inherited methods | |
---|---|
From
class
android.support.v17.leanback.widget.Row
| |
From
class
java.lang.Object
|
Public constructors
PlaybackControlsRow
PlaybackControlsRow (Object item)
Constructor for a PlaybackControlsRow that displays some details from the given item.
Parameters | |
---|---|
item |
Object : The main item for the row.
|
PlaybackControlsRow
PlaybackControlsRow ()
Constructor for a PlaybackControlsRow that has no item details.
Public methods
getActionForKeyCode
Action getActionForKeyCode (ObjectAdapter adapter, int keyCode)
Returns the Action associated with the given keycode, or null if no associated action exists.
Parameters | |
---|---|
adapter |
ObjectAdapter |
keyCode |
int |
Returns | |
---|---|
Action |
getActionForKeyCode
Action getActionForKeyCode (int keyCode)
Returns the Action associated with the given keycode, or null if no associated action exists. Searches the primary adapter first, then the secondary adapter.
Parameters | |
---|---|
keyCode |
int |
Returns | |
---|---|
Action |
getBufferedPosition
long getBufferedPosition ()
Returns the buffered progress of long type for the playback controls row.
Returns | |
---|---|
long |
getBufferedProgress
int getBufferedProgress ()
This method was deprecated
in API level 26.1.0.
Use getBufferedPosition()
Returns the buffered progress for the playback controls row.
Returns | |
---|---|
int |
Throws | |
---|---|
ArithmeticException |
If buffered progress in milliseconds overflows int. |
getBufferedProgressLong
long getBufferedProgressLong ()
This method was deprecated
in API level 26.1.0.
Use getBufferedPosition()
Returns the buffered progress of long type for the playback controls row.
Returns | |
---|---|
long |
getCurrentPosition
long getCurrentPosition ()
Returns the current time in milliseconds of long type for playback controls row.
Returns | |
---|---|
long |
getCurrentTime
int getCurrentTime ()
This method was deprecated
in API level 26.1.0.
Use getCurrentPosition()
Returns the current time in milliseconds for the playback controls row.
Returns | |
---|---|
int |
Throws | |
---|---|
ArithmeticException |
If current time in milliseconds overflows int. |
getCurrentTimeLong
long getCurrentTimeLong ()
This method was deprecated
in API level 26.1.0.
Use getCurrentPosition()
Returns the current time in milliseconds of long type for playback controls row.
Returns | |
---|---|
long |
getDuration
long getDuration ()
Returns duration in milliseconds.
Returns | |
---|---|
long |
Duration in milliseconds. |
getImageDrawable
Drawable getImageDrawable ()
Returns the image Drawable
of this row.
Returns | |
---|---|
Drawable |
The overview's image drawable, or null if no drawable has been assigned. |
getItem
Object getItem ()
Returns the main item for the details page.
Returns | |
---|---|
Object |
getPrimaryActionsAdapter
ObjectAdapter getPrimaryActionsAdapter ()
Returns the primary actions ObjectAdapter
.
Returns | |
---|---|
ObjectAdapter |
getSecondaryActionsAdapter
ObjectAdapter getSecondaryActionsAdapter ()
Returns the secondary actions ObjectAdapter
.
Returns | |
---|---|
ObjectAdapter |
getTotalTime
int getTotalTime ()
This method was deprecated
in API level 26.1.0.
use getDuration()
Returns the total time in milliseconds for the playback controls row.
Returns | |
---|---|
int |
Throws | |
---|---|
ArithmeticException |
If total time in milliseconds overflows int. |
getTotalTimeLong
long getTotalTimeLong ()
This method was deprecated
in API level 26.1.0.
use getDuration()
Returns the total time in milliseconds of long type for the playback controls row.
Returns | |
---|---|
long |
setBufferedPosition
void setBufferedPosition (long ms)
Sets the buffered progress for the playback controls row.
Parameters | |
---|---|
ms |
long : Buffered progress in milliseconds of long type.
|
setBufferedProgress
void setBufferedProgress (int ms)
This method was deprecated
in API level 26.1.0.
Use setBufferedPosition(long)
Sets the buffered progress for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.
Parameters | |
---|---|
ms |
int |
setBufferedProgressLong
void setBufferedProgressLong (long ms)
This method was deprecated
in API level 26.1.0.
Use setBufferedPosition(long)
Sets the buffered progress for the playback controls row.
Parameters | |
---|---|
ms |
long : Buffered progress in milliseconds of long type. |
setCurrentPosition
void setCurrentPosition (long ms)
Sets the current time in milliseconds for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.
Parameters | |
---|---|
ms |
long : Current time in milliseconds of long type.
|
setCurrentTime
void setCurrentTime (int ms)
This method was deprecated
in API level 26.1.0.
use setCurrentPosition(long)
Sets the current time in milliseconds for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.
Parameters | |
---|---|
ms |
int |
setCurrentTimeLong
void setCurrentTimeLong (long ms)
This method was deprecated
in API level 26.1.0.
use setCurrentPosition(long)
Sets the current time in milliseconds for playback controls row in long type.
Parameters | |
---|---|
ms |
long : Current time in milliseconds of long type. |
setDuration
void setDuration (long ms)
Sets the total time in milliseconds (long type) for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.
Parameters | |
---|---|
ms |
long : Total time in milliseconds of long type.
|
setImageBitmap
void setImageBitmap (Context context, Bitmap bm)
Sets a 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.
Parameters | |
---|---|
context |
Context : The context to retrieve display metrics from. |
bm |
Bitmap : The bitmap to set.
|
setImageDrawable
void setImageDrawable (Drawable drawable)
Sets a {link @Drawable} image for this row.
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
Parameters | |
---|---|
drawable |
Drawable : The drawable to set.
|
setOnPlaybackProgressChangedListener
void setOnPlaybackProgressChangedListener (PlaybackControlsRow.OnPlaybackProgressCallback listener)
Sets a listener to be called when the playback state changes.
Parameters | |
---|---|
listener |
PlaybackControlsRow.OnPlaybackProgressCallback |
setPrimaryActionsAdapter
void setPrimaryActionsAdapter (ObjectAdapter adapter)
Sets the primary actions ObjectAdapter
.
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
Parameters | |
---|---|
adapter |
ObjectAdapter |
setSecondaryActionsAdapter
void setSecondaryActionsAdapter (ObjectAdapter adapter)
Sets the secondary actions ObjectAdapter
.
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
Parameters | |
---|---|
adapter |
ObjectAdapter |
setTotalTime
void setTotalTime (int ms)
This method was deprecated
in API level 26.1.0.
Use setDuration(long)
Sets the total time in milliseconds for the playback controls row.
If set after the row has been bound to a view, the adapter must be notified that this row has changed.
Parameters | |
---|---|
ms |
int |
setTotalTimeLong
void setTotalTimeLong (long ms)
This method was deprecated
in API level 26.1.0.
Use setDuration(long)
Sets the total time in milliseconds (long type) for the playback controls row.
Parameters | |
---|---|
ms |
long : Total time in milliseconds of long type. |
Interfaces
- BaseGridView.OnKeyInterceptListener
- BaseGridView.OnMotionInterceptListener
- BaseGridView.OnTouchInterceptListener
- BaseGridView.OnUnhandledKeyListener
- BaseOnItemViewClickedListener
- BaseOnItemViewSelectedListener
- BrowseFrameLayout.OnChildFocusListener
- BrowseFrameLayout.OnFocusSearchListener
- FacetProvider
- FacetProviderAdapter
- FocusHighlight
- FragmentAnimationProvider
- ImeKeyMonitor
- ImeKeyMonitor.ImeKeyListener
- MultiActionsProvider
- OnActionClickedListener
- OnChildLaidOutListener
- OnChildSelectedListener
- OnItemViewClickedListener
- OnItemViewSelectedListener
- PlaybackSeekUi
- SearchBar.SearchBarListener
- SearchBar.SearchBarPermissionListener
- SearchEditText.OnKeyboardDismissListener
- SpeechRecognitionCallback
- TitleViewAdapter.Provider
- ViewHolderTask
Classes
- AbstractDetailsDescriptionPresenter
- AbstractDetailsDescriptionPresenter.ViewHolder
- AbstractMediaItemPresenter
- AbstractMediaItemPresenter.ViewHolder
- AbstractMediaListHeaderPresenter
- AbstractMediaListHeaderPresenter.ViewHolder
- Action
- ArrayObjectAdapter
- BaseCardView
- BaseCardView.LayoutParams
- BaseGridView
- BrowseFrameLayout
- ClassPresenterSelector
- ControlButtonPresenterSelector
- CursorObjectAdapter
- DetailsOverviewLogoPresenter
- DetailsOverviewLogoPresenter.ViewHolder
- DetailsOverviewRow
- DetailsOverviewRow.Listener
- DetailsOverviewRowPresenter
- DetailsOverviewRowPresenter.ViewHolder
- DetailsParallax
- DiffCallback
- DividerPresenter
- DividerRow
- FocusHighlightHelper
- FullWidthDetailsOverviewRowPresenter
- FullWidthDetailsOverviewRowPresenter.Listener
- FullWidthDetailsOverviewRowPresenter.ViewHolder
- FullWidthDetailsOverviewRowPresenter.ViewHolder.DetailsOverviewRowListener
- FullWidthDetailsOverviewSharedElementHelper
- GuidanceStylist
- GuidanceStylist.Guidance
- GuidedAction
- GuidedAction.Builder
- GuidedAction.BuilderBase
- GuidedActionDiffCallback
- GuidedActionEditText
- GuidedActionsStylist
- GuidedActionsStylist.ViewHolder
- GuidedDatePickerAction
- GuidedDatePickerAction.Builder
- GuidedDatePickerAction.BuilderBase
- HeaderItem
- HorizontalGridView
- HorizontalHoverCardSwitcher
- ImageCardView
- ItemAlignmentFacet
- ItemAlignmentFacet.ItemAlignmentDef
- ItemBridgeAdapter
- ItemBridgeAdapter.AdapterListener
- ItemBridgeAdapter.ViewHolder
- ItemBridgeAdapter.Wrapper
- ItemBridgeAdapterShadowOverlayWrapper
- ListRow
- ListRowHoverCardView
- ListRowPresenter
- ListRowPresenter.SelectItemViewHolderTask
- ListRowPresenter.ViewHolder
- ListRowView
- MultiActionsProvider.MultiAction
- ObjectAdapter
- ObjectAdapter.DataObserver
- OnChildViewHolderSelectedListener
- PageRow
- Parallax
- Parallax.FloatProperty
- Parallax.IntProperty
- Parallax.PropertyMarkerValue
- ParallaxEffect
- ParallaxTarget
- ParallaxTarget.DirectPropertyTarget
- ParallaxTarget.PropertyValuesHolderTarget
- PlaybackControlsRow
- PlaybackControlsRow.ClosedCaptioningAction
- PlaybackControlsRow.FastForwardAction
- PlaybackControlsRow.HighQualityAction
- PlaybackControlsRow.MoreActions
- PlaybackControlsRow.MultiAction
- PlaybackControlsRow.OnPlaybackProgressCallback
- PlaybackControlsRow.PictureInPictureAction
- PlaybackControlsRow.PlayPauseAction
- PlaybackControlsRow.RepeatAction
- PlaybackControlsRow.RewindAction
- PlaybackControlsRow.ShuffleAction
- PlaybackControlsRow.SkipNextAction
- PlaybackControlsRow.SkipPreviousAction
- PlaybackControlsRow.ThumbsAction
- PlaybackControlsRow.ThumbsDownAction
- PlaybackControlsRow.ThumbsUpAction
- PlaybackControlsRowPresenter
- PlaybackControlsRowPresenter.ViewHolder
- PlaybackRowPresenter
- PlaybackRowPresenter.ViewHolder
- PlaybackSeekDataProvider
- PlaybackSeekDataProvider.ResultCallback
- PlaybackSeekUi.Client
- PlaybackTransportRowPresenter
- PlaybackTransportRowPresenter.ViewHolder
- Presenter
- Presenter.ViewHolder
- Presenter.ViewHolderTask
- PresenterSelector
- PresenterSwitcher
- RecyclerViewParallax
- RecyclerViewParallax.ChildPositionProperty
- Row
- RowHeaderPresenter
- RowHeaderPresenter.ViewHolder
- RowHeaderView
- RowPresenter
- RowPresenter.ViewHolder
- SearchBar
- SearchEditText
- SearchOrbView
- SearchOrbView.Colors
- SectionRow
- ShadowOverlayContainer
- ShadowOverlayHelper
- ShadowOverlayHelper.Builder
- ShadowOverlayHelper.Options
- SinglePresenterSelector
- SparseArrayObjectAdapter
- SpeechOrbView
- TitleHelper
- TitleView
- TitleViewAdapter
- VerticalGridPresenter
- VerticalGridPresenter.ViewHolder
- VerticalGridView
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.