Search in sources :

Example 1 with PlayMode

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);
}
Also used : PlayMode(io.github.ryanhoo.music.player.PlayMode)

Example 2 with PlayMode

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);
}
Also used : PlayMode(io.github.ryanhoo.music.player.PlayMode) OnClick(butterknife.OnClick)

Aggregations

PlayMode (io.github.ryanhoo.music.player.PlayMode)2 OnClick (butterknife.OnClick)1