From 80d1c5b9f5ee70c695e50b96ab93610dce5bda4d Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Sun, 28 Mar 2021 22:04:54 +0300 Subject: [PATCH] Fix Repeat Button color in Player --- app/src/main/java/org/schabi/newpipe/player/Player.java | 5 +++-- app/src/main/res/layout/player.xml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 487c93336..de1f274b2 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -52,6 +52,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.content.res.AppCompatResources; +import androidx.appcompat.widget.AppCompatImageButton; import androidx.core.content.ContextCompat; import androidx.core.view.DisplayCutoutCompat; import androidx.core.view.ViewCompat; @@ -2225,7 +2226,7 @@ public final class Player implements Log.d(TAG, "ExoPlayer - onRepeatModeChanged() called with: " + "repeatMode = [" + repeatMode + "]"); } - setRepeatModeButton(binding.repeatButton, repeatMode); + setRepeatModeButton(((AppCompatImageButton) binding.repeatButton), repeatMode); onShuffleOrRepeatModeChanged(); } @@ -2253,7 +2254,7 @@ public final class Player implements NotificationUtil.getInstance().createNotificationIfNeededAndUpdate(this, false); } - private void setRepeatModeButton(final ImageButton imageButton, final int repeatMode) { + private void setRepeatModeButton(final AppCompatImageButton imageButton, final int repeatMode) { switch (repeatMode) { case REPEAT_MODE_OFF: imageButton.setImageResource(R.drawable.exo_controls_repeat_off); diff --git a/app/src/main/res/layout/player.xml b/app/src/main/res/layout/player.xml index 978913289..9f4a0166e 100644 --- a/app/src/main/res/layout/player.xml +++ b/app/src/main/res/layout/player.xml @@ -513,7 +513,7 @@ android:scaleType="fitXY" app:srcCompat="@drawable/ic_close" /> -