diff --git a/res/drawable/disableable_button.xml b/res/drawable/disableable_button.xml new file mode 100644 --- /dev/null +++ b/res/drawable/disableable_button.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/res/layout/mpris_control.xml b/res/layout/mpris_control.xml --- a/res/layout/mpris_control.xml +++ b/res/layout/mpris_control.xml @@ -46,6 +46,7 @@ android:baselineAlignBottom="true" android:clickable="false" android:contentDescription="@string/mpris_play" + android:theme="@style/DisableableButton" android:src="@drawable/ic_play_black" /> diff --git a/res/values/styles.xml b/res/values/styles.xml --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -2,6 +2,7 @@ #F67400 #BD5900 #4ebffa + #eee + + diff --git a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java --- a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java +++ b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java @@ -237,10 +237,10 @@ boolean isPlaying = playerStatus.isPlaying(); if (isPlaying) { ((ImageButton) findViewById(R.id.play_button)).setImageResource(R.drawable.ic_pause_black); - findViewById(R.id.play_button).setVisibility(playerStatus.isPauseAllowed() ? View.VISIBLE : View.GONE); + findViewById(R.id.play_button).setEnabled(playerStatus.isPauseAllowed()); } else { ((ImageButton) findViewById(R.id.play_button)).setImageResource(R.drawable.ic_play_black); - findViewById(R.id.play_button).setVisibility(playerStatus.isPlayAllowed() ? View.VISIBLE : View.GONE); + findViewById(R.id.play_button).setEnabled(playerStatus.isPlayAllowed()); } findViewById(R.id.volume_layout).setVisibility(playerStatus.isSetVolumeAllowed() ? View.VISIBLE : View.INVISIBLE);