Java 类android.support.v17.leanback.widget.PlaybackControlsRow.FastForwardAction 实例源码

项目:popcorn-android    文件:PTVPlaybackOverlayFragment.java   
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);
    }
}