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 @@ -44,9 +44,9 @@ android:id="@+id/play_button" android:src="@drawable/ic_play_black" android:contentDescription="@string/mpris_play" + android:theme="@style/DisableableButton" android:layout_gravity="center" android:layout_weight="0" - android:clickable="false" android:adjustViewBounds="false" android:baselineAlignBottom="true" /> 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 @@ -225,10 +225,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);