Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .idea/modules.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class ArgMusicService extends Service implements MediaPlayer.OnPreparedListener,
protected boolean progressCancellation = false;
protected boolean errorViewCancellation = false;
protected boolean nextPrevButtons = true;
protected boolean repeatButton = true;
protected int playButtonResId = R.drawable.arg_play;
protected int pauseButtonResId = R.drawable.arg_pause;
protected int repeatButtonResId = R.drawable.arg_repeat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ private void changeRepeatButton() {
if (player.getPlaylistRepeat())
btnRepeat.setImageResource(player.service.repeatButtonResId);
else btnRepeat.setImageResource(player.service.repeatNotButtonResId);
if (player.service.repeatButton) {
btnRepeat.setVisibility(VISIBLE);
} else {
btnRepeat.setVisibility(GONE);
}
changeNextPrevButtons();
}

Expand Down Expand Up @@ -231,6 +236,16 @@ public void enableProgress() {
player.service.progressCancellation = false;
}

public void disableRepeatButton() {
player.service.repeatButton = false;
changeRepeatButton();
}

public void enableRepeatButton() {
player.service.repeatButton = true;
changeRepeatButton();
}

public void disableErrorView() {
player.service.errorViewCancellation = true;
}
Expand Down