Fix Repeat Button color in Player

This commit is contained in:
krlvm 2021-03-28 22:04:54 +03:00
parent 7175f27da8
commit 80d1c5b9f5
No known key found for this signature in database
GPG Key ID: B8552A91FD265536
2 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -513,7 +513,7 @@
android:scaleType="fitXY"
app:srcCompat="@drawable/ic_close" />
<ImageButton
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/repeatButton"
android:layout_width="50dp"
android:layout_height="50dp"
@ -527,8 +527,8 @@
android:focusable="true"
android:padding="10dp"
android:scaleType="fitXY"
android:src="@drawable/exo_controls_repeat_off"
android:tint="?attr/colorAccent"
app:srcCompat="@drawable/exo_controls_repeat_off"
tools:ignore="ContentDescription,RtlHardcoded" />
<androidx.appcompat.widget.AppCompatImageButton