public class PlaybackControlsRowPresenter extends RowPresenter
PlaybackControlsRow
to display a
series of playback control buttons. Typically this row will be the first row in a fragment
such as the PlaybackOverlayFragment
.
The detailed description is rendered using a Presenter
passed in
PlaybackControlsRowPresenter(Presenter)
. Typically this will be an instance of
AbstractDetailsDescriptionPresenter
. The application can access the
detailed description ViewHolder from PlaybackControlsRowPresenter.ViewHolder.mDescriptionViewHolder
.
Modifier and Type | Class and Description |
---|---|
class |
PlaybackControlsRowPresenter.ViewHolder
A ViewHolder for the PlaybackControlsRow.
|
Presenter.ViewHolderTask
SYNC_ACTIVATED_CUSTOM, SYNC_ACTIVATED_TO_EXPANDED, SYNC_ACTIVATED_TO_EXPANDED_AND_SELECTED, SYNC_ACTIVATED_TO_SELECTED
Constructor and Description |
---|
PlaybackControlsRowPresenter()
Constructor for a PlaybackControlsRowPresenter.
|
PlaybackControlsRowPresenter(Presenter descriptionPresenter)
Constructor for a PlaybackControlsRowPresenter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areSecondaryActionsHidden()
Returns true if secondary actions are hidden.
|
protected RowPresenter.ViewHolder |
createRowViewHolder(ViewGroup parent)
Called to create a ViewHolder object for a Row.
|
int |
getBackgroundColor()
Returns the background color.
|
OnActionClickedListener |
getOnActionClickedListener()
Returns the listener for
Action click events. |
int |
getProgressColor()
Returns the primary color for the progress bar.
|
protected void |
onBindRowViewHolder(RowPresenter.ViewHolder holder,
Object item)
Binds the given row object to the given ViewHolder.
|
protected void |
onRowViewAttachedToWindow(RowPresenter.ViewHolder vh)
Invoked when the row view is attached to the window.
|
protected void |
onRowViewDetachedFromWindow(RowPresenter.ViewHolder vh)
Invoked when the row view is detached from the window.
|
protected void |
onRowViewSelected(RowPresenter.ViewHolder vh,
boolean selected)
Called when the given row view changes selection state.
|
protected void |
onUnbindRowViewHolder(RowPresenter.ViewHolder holder)
Unbinds the given ViewHolder.
|
void |
setBackgroundColor(int color)
Sets the background color.
|
void |
setOnActionClickedListener(OnActionClickedListener listener)
Sets the listener for
Action click events. |
void |
setProgressColor(int color)
Sets the primary color for the progress bar.
|
void |
setSecondaryActionsHidden(boolean hidden)
Sets the secondary actions to be hidden behind a "more actions" button.
|
void |
showBottomSpace(PlaybackControlsRowPresenter.ViewHolder vh,
boolean show)
Shows or hides space at the bottom of the playback controls row.
|
void |
showPrimaryActions(PlaybackControlsRowPresenter.ViewHolder vh)
Displays the primary actions.
|
dispatchItemSelectedListener, freeze, getHeaderPresenter, getRowViewHolder, getSelectEffectEnabled, getSelectLevel, getSyncActivatePolicy, initializeRowViewHolder, isClippingChildren, isUsingDefaultSelectEffect, onBindViewHolder, onCreateViewHolder, onRowViewExpanded, onSelectLevelChanged, onUnbindViewHolder, onViewAttachedToWindow, onViewDetachedFromWindow, setEntranceTransitionState, setHeaderPresenter, setRowViewExpanded, setRowViewSelected, setSelectEffectEnabled, setSelectLevel, setSyncActivatePolicy
cancelAnimationsRecursive, getFacet, setFacet, setOnClickListener
public PlaybackControlsRowPresenter(Presenter descriptionPresenter)
descriptionPresenter
- Presenter for displaying item details.public PlaybackControlsRowPresenter()
public void setOnActionClickedListener(OnActionClickedListener listener)
Action
click events.public OnActionClickedListener getOnActionClickedListener()
Action
click events.public void setBackgroundColor(int color)
public int getBackgroundColor()
public void setProgressColor(int color)
public int getProgressColor()
public void setSecondaryActionsHidden(boolean hidden)
public boolean areSecondaryActionsHidden()
public void showBottomSpace(PlaybackControlsRowPresenter.ViewHolder vh, boolean show)
public void showPrimaryActions(PlaybackControlsRowPresenter.ViewHolder vh)
setSecondaryActionsHidden(boolean)
.protected RowPresenter.ViewHolder createRowViewHolder(ViewGroup parent)
RowPresenter
createRowViewHolder
in class RowPresenter
parent
- The parent View for the Row's view holder.protected void onBindRowViewHolder(RowPresenter.ViewHolder holder, Object item)
RowPresenter
RowPresenter
overriding
RowPresenter.onBindRowViewHolder(ViewHolder, Object)
must call through the super class's
implementation of this method.onBindRowViewHolder
in class RowPresenter
protected void onUnbindRowViewHolder(RowPresenter.ViewHolder holder)
RowPresenter
RowPresenter
overriding RowPresenter.onUnbindRowViewHolder(ViewHolder)
must call through the super class's implementation of this method.onUnbindRowViewHolder
in class RowPresenter
protected void onRowViewSelected(RowPresenter.ViewHolder vh, boolean selected)
RowPresenter
onRowViewSelected
in class RowPresenter
protected void onRowViewAttachedToWindow(RowPresenter.ViewHolder vh)
RowPresenter
onRowViewAttachedToWindow
in class RowPresenter
protected void onRowViewDetachedFromWindow(RowPresenter.ViewHolder vh)
RowPresenter
onRowViewDetachedFromWindow
in class RowPresenter