hide the playbackspeed button on the castplayer activity

This commit is contained in:
Domingos Lopes 2016-04-17 02:57:37 -04:00
parent 450329a5e3
commit 1130e8ee87
1 changed files with 40 additions and 34 deletions

View File

@ -729,6 +729,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
// BUTTON SETUP // BUTTON SETUP
if(butPlaybackSpeed != null) { if(butPlaybackSpeed != null) {
if (this instanceof AudioplayerActivity) {
butPlaybackSpeed.setOnClickListener(v -> { butPlaybackSpeed.setOnClickListener(v -> {
if (controller == null) { if (controller == null) {
return; return;
@ -767,6 +768,11 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
VariableSpeedDialog.showDialog(this); VariableSpeedDialog.showDialog(this);
return true; return true;
}); });
butPlaybackSpeed.setVisibility(View.VISIBLE);
} else {
// TODO in the future, perhaps replace it with some cast related button
butPlaybackSpeed.setVisibility(View.GONE);
}
} }
if (butRev != null) { if (butRev != null) {