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); } }