本文整理汇总了Java中android.support.v17.leanback.widget.PlaybackControlsRow.PlayPauseAction.PLAY属性的典型用法代码示例。如果您正苦于以下问题:Java PlayPauseAction.PLAY属性的具体用法?Java PlayPauseAction.PLAY怎么用?Java PlayPauseAction.PLAY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.support.v17.leanback.widget.PlaybackControlsRow.PlayPauseAction
的用法示例。
在下文中一共展示了PlayPauseAction.PLAY属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: next
private void next() {
if (++mCurrentItem >= mItems.size()) {
mCurrentItem = 0;
}
if (mPlayPauseAction.getIndex() == PlayPauseAction.PLAY) {
mCallback.onFragmentPlayPause(mItems.get(mCurrentItem), 0, false);
} else {
mCallback.onFragmentPlayPause(mItems.get(mCurrentItem), 0, true);
}
updatePlaybackRow(mCurrentItem);
}
示例2: prev
private void prev() {
if (--mCurrentItem < 0) {
mCurrentItem = mItems.size() - 1;
}
if (mPlayPauseAction.getIndex() == PlayPauseAction.PLAY) {
mCallback.onFragmentPlayPause(mItems.get(mCurrentItem), 0, false);
} else {
mCallback.onFragmentPlayPause(mItems.get(mCurrentItem), 0, true);
}
updatePlaybackRow(mCurrentItem);
}
示例3: setVideoIndex
private void setVideoIndex(int itemIndex) {
mCurrentIndex = itemIndex;
mVideo = mItems.get(mCurrentIndex);
if (mPlayPauseAction.getIndex() == PlayPauseAction.PLAY) {
mCallback.onFragmentPlayPause(mVideo, 0, false);
} else {
mCallback.onFragmentPlayPause(mVideo, 0, true);
}
updatePlaybackRow();
}
示例4: onActionClicked
public void onActionClicked(Action action) {
if (action.getId() == mPlayPauseAction.getId()) {
if (mPlayPauseAction.getIndex() == PlayPauseAction.PLAY) {
startProgressAutomation();
setFadingEnabled(true);
mCallback.onFragmentPlayPause(mVideo,
mPlaybackControlsRow.getCurrentTime(), true);
} else {
stopProgressAutomation();
setFadingEnabled(false);
mCallback.onFragmentPlayPause(mVideo,
mPlaybackControlsRow.getCurrentTime(), false);
}
} else if (action.getId() == mSkipNextAction.getId()) {
next();
} else if (action.getId() == mSkipPreviousAction.getId()) {
prev();
} else if (action.getId() == mFastForwardAction.getId()) {
fastForward();
} else if (action.getId() == mRewindAction.getId()) {
fastRewind();
}
if (action instanceof PlaybackControlsRow.MultiAction) {
((PlaybackControlsRow.MultiAction) action).nextIndex();
notifyChanged(action);
}
}