use of io.github.ryanhoo.music.player.PlayMode in project StylishMusicPlayer by ryanhoo.
the class MusicPlayerPresenter method retrieveLastPlayMode.
@Override
public void retrieveLastPlayMode() {
PlayMode lastPlayMode = PreferenceManager.lastPlayMode(mContext);
mView.updatePlayMode(lastPlayMode);
}
use of io.github.ryanhoo.music.player.PlayMode in project StylishMusicPlayer by ryanhoo.
the class MusicPlayerFragment method onPlayModeToggleAction.
@OnClick(R.id.button_play_mode_toggle)
public void onPlayModeToggleAction(View view) {
if (mPlayer == null)
return;
PlayMode current = PreferenceManager.lastPlayMode(getActivity());
PlayMode newMode = PlayMode.switchNextMode(current);
PreferenceManager.setPlayMode(getActivity(), newMode);
mPlayer.setPlayMode(newMode);
updatePlayMode(newMode);
}