mute-buton in queue layout and logic, but no icon change
This commit is contained in:
parent
cc559dc9ce
commit
2a63f2a3a6
3 changed files with 44 additions and 9 deletions
|
|
@ -83,6 +83,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
private TextView seekDisplay;
|
||||
|
||||
private ImageButton repeatButton;
|
||||
private ImageButton muteButton;
|
||||
private ImageButton backwardButton;
|
||||
private ImageButton playPauseButton;
|
||||
private ImageButton forwardButton;
|
||||
|
|
@ -305,6 +306,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
|
||||
private void buildControls() {
|
||||
repeatButton = rootView.findViewById(R.id.control_repeat);
|
||||
muteButton = rootView.findViewById(R.id.control_mute);
|
||||
backwardButton = rootView.findViewById(R.id.control_backward);
|
||||
playPauseButton = rootView.findViewById(R.id.control_play_pause);
|
||||
forwardButton = rootView.findViewById(R.id.control_forward);
|
||||
|
|
@ -314,6 +316,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
progressBar = rootView.findViewById(R.id.control_progress_bar);
|
||||
|
||||
repeatButton.setOnClickListener(this);
|
||||
muteButton.setOnClickListener(this);
|
||||
backwardButton.setOnClickListener(this);
|
||||
playPauseButton.setOnClickListener(this);
|
||||
forwardButton.setOnClickListener(this);
|
||||
|
|
@ -446,6 +449,9 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
if (view.getId() == repeatButton.getId()) {
|
||||
player.onRepeatClicked();
|
||||
|
||||
} else if (view.getId() == muteButton.getId()) {
|
||||
player.onMuteUnmuteButtonClicled();
|
||||
|
||||
} else if (view.getId() == backwardButton.getId()) {
|
||||
player.onPlayPrevious();
|
||||
|
||||
|
|
@ -661,7 +667,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
final int shuffleAlpha = shuffled ? 255 : 77;
|
||||
shuffleButton.setImageAlpha(shuffleAlpha);
|
||||
}
|
||||
|
||||
|
||||
private void onPlaybackParameterChanged(final PlaybackParameters parameters) {
|
||||
if (parameters != null) {
|
||||
playbackSpeedButton.setText(formatSpeed(parameters.speed));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue