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