本文整理汇总了Java中android.support.v17.leanback.widget.PlaybackControlsRow.SkipPreviousAction方法的典型用法代码示例。如果您正苦于以下问题:Java PlaybackControlsRow.SkipPreviousAction方法的具体用法?Java PlaybackControlsRow.SkipPreviousAction怎么用?Java PlaybackControlsRow.SkipPreviousAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v17.leanback.widget.PlaybackControlsRow
的用法示例。
在下文中一共展示了PlaybackControlsRow.SkipPreviousAction方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupPrimaryRowPlaybackControl
import android.support.v17.leanback.widget.PlaybackControlsRow; //导入方法依赖的package包/类
private void setupPrimaryRowPlaybackControl(@NonNull ControlButtonPresenterSelector presenterSelector) {
mPrimaryActionsAdapter = new ArrayObjectAdapter(presenterSelector);
mPlaybackControlsRow.setPrimaryActionsAdapter(mPrimaryActionsAdapter);
Activity activity = getActivity();
mPlayPauseAction = new PlayPauseAction(activity);
mFastForwardAction = new FastForwardAction(activity);
mRewindAction = new RewindAction(activity);
if (mPreviousEpisode != null) {
mSkipPreviousAction = new PlaybackControlsRow.SkipPreviousAction(activity);
mPrimaryActionsAdapter.add(mSkipPreviousAction);
}
// Add main controls to primary adapter.
mPrimaryActionsAdapter.add(mRewindAction);
mPrimaryActionsAdapter.add(mPlayPauseAction);
mPrimaryActionsAdapter.add(mFastForwardAction);
if (mNextEpisode != null) {
mSkipNextAction = new PlaybackControlsRow.SkipNextAction(activity);
mPrimaryActionsAdapter.add(mSkipNextAction);
}
}
示例2: addPlaybackControlsRow
import android.support.v17.leanback.widget.PlaybackControlsRow; //导入方法依赖的package包/类
private void addPlaybackControlsRow(MediaMetadata metadata) {
mPlaybackControlsRow = new PlaybackControlsRow(new MutableMediaMetadataHolder(metadata));
mRowsAdapter.add(mPlaybackControlsRow);
resetPlaybackRow();
ControlButtonPresenterSelector presenterSelector = new ControlButtonPresenterSelector();
mPrimaryActionsAdapter = new ArrayObjectAdapter(presenterSelector);
mPlaybackControlsRow.setPrimaryActionsAdapter(mPrimaryActionsAdapter);
mPlayPauseAction = new PlayPauseAction(getActivity());
mSkipNextAction = new PlaybackControlsRow.SkipNextAction(getActivity());
mSkipPreviousAction = new PlaybackControlsRow.SkipPreviousAction(getActivity());
mPrimaryActionsAdapter.add(mSkipPreviousAction);
mPrimaryActionsAdapter.add(mPlayPauseAction);
mPrimaryActionsAdapter.add(mSkipNextAction);
}
示例3: addPlaybackControlsRow
import android.support.v17.leanback.widget.PlaybackControlsRow; //导入方法依赖的package包/类
private void addPlaybackControlsRow(MediaMetadataCompat metadata) {
mPlaybackControlsRow = new PlaybackControlsRow(new MutableMediaMetadataHolder(metadata));
mRowsAdapter.add(mPlaybackControlsRow);
resetPlaybackRow();
ControlButtonPresenterSelector presenterSelector = new ControlButtonPresenterSelector();
mPrimaryActionsAdapter = new ArrayObjectAdapter(presenterSelector);
mPlaybackControlsRow.setPrimaryActionsAdapter(mPrimaryActionsAdapter);
mPlayPauseAction = new PlayPauseAction(getActivity());
mSkipNextAction = new PlaybackControlsRow.SkipNextAction(getActivity());
mSkipPreviousAction = new PlaybackControlsRow.SkipPreviousAction(getActivity());
mPrimaryActionsAdapter.add(mSkipPreviousAction);
mPrimaryActionsAdapter.add(mPlayPauseAction);
mPrimaryActionsAdapter.add(mSkipNextAction);
}
示例4: VideoPlayerGlue
import android.support.v17.leanback.widget.PlaybackControlsRow; //导入方法依赖的package包/类
public VideoPlayerGlue(
Context context,
LeanbackPlayerAdapter playerAdapter,
OnActionClickedListener actionListener) {
super(context, playerAdapter);
mActionListener = actionListener;
mSkipPreviousAction = new PlaybackControlsRow.SkipPreviousAction(context);
mSkipNextAction = new PlaybackControlsRow.SkipNextAction(context);
mFastForwardAction = new PlaybackControlsRow.FastForwardAction(context);
mRewindAction = new PlaybackControlsRow.RewindAction(context);
mThumbsUpAction = new PlaybackControlsRow.ThumbsUpAction(context);
mThumbsUpAction.setIndex(PlaybackControlsRow.ThumbsUpAction.INDEX_OUTLINE);
mThumbsDownAction = new PlaybackControlsRow.ThumbsDownAction(context);
mThumbsDownAction.setIndex(PlaybackControlsRow.ThumbsDownAction.INDEX_OUTLINE);
mRepeatAction = new PlaybackControlsRow.RepeatAction(context);
}
示例5: PrimaryPlaybackControlsGlue
import android.support.v17.leanback.widget.PlaybackControlsRow; //导入方法依赖的package包/类
public PrimaryPlaybackControlsGlue(
Context context, T adapter, MediaControllerCompat mediaController) {
super(context, adapter);
mMediaSessionTransportControls = mediaController.getTransportControls();
mSkipPreviousAction = new PlaybackControlsRow.SkipPreviousAction(context);
mSkipNextAction = new PlaybackControlsRow.SkipNextAction(context);
mFastForwardAction = new PlaybackControlsRow.FastForwardAction(context);
mRewindAction = new PlaybackControlsRow.RewindAction(context);
}