Add speed button to top bar
This commit is contained in:
parent
36b4134838
commit
72af51fe9d
2 changed files with 15 additions and 1 deletions
|
|
@ -164,6 +164,9 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
case R.id.action_append_playlist:
|
||||
appendAllToPlaylist();
|
||||
return true;
|
||||
case R.id.action_playback_speed:
|
||||
openPlaybackParameterDialog();
|
||||
return true;
|
||||
case R.id.action_mute:
|
||||
player.onMuteUnmuteButtonClicked();
|
||||
return true;
|
||||
|
|
@ -688,7 +691,10 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
|
|||
|
||||
private void onPlaybackParameterChanged(final PlaybackParameters parameters) {
|
||||
if (parameters != null) {
|
||||
Log.d("Dupa", "12");
|
||||
if (menu != null && player != null) {
|
||||
MenuItem item = menu.findItem(R.id.action_playback_speed);
|
||||
item.setTitle(formatSpeed(parameters.speed));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue