当前位置: 首页>>代码示例>>Java>>正文


Java PlayPauseAction.PLAY属性代码示例

本文整理汇总了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);
}
 
开发者ID:bassaer,项目名称:HelloTV,代码行数:12,代码来源:PlaybackOverlayFragment.java

示例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);
}
 
开发者ID:bassaer,项目名称:HelloTV,代码行数:11,代码来源:PlaybackOverlayFragment.java

示例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();
}
 
开发者ID:googlecodelabs,项目名称:android-tv-leanback,代码行数:10,代码来源:PlaybackOverlayFragment.java

示例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);
    }
}
 
开发者ID:googlecodelabs,项目名称:android-tv-leanback,代码行数:27,代码来源:PlaybackOverlayFragment.java


注:本文中的android.support.v17.leanback.widget.PlaybackControlsRow.PlayPauseAction.PLAY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。