mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	Fix Repeat Button color in Player
This commit is contained in:
		| @@ -52,6 +52,7 @@ import androidx.annotation.NonNull; | |||||||
| import androidx.annotation.Nullable; | import androidx.annotation.Nullable; | ||||||
| import androidx.appcompat.app.AppCompatActivity; | import androidx.appcompat.app.AppCompatActivity; | ||||||
| import androidx.appcompat.content.res.AppCompatResources; | import androidx.appcompat.content.res.AppCompatResources; | ||||||
|  | import androidx.appcompat.widget.AppCompatImageButton; | ||||||
| import androidx.core.content.ContextCompat; | import androidx.core.content.ContextCompat; | ||||||
| import androidx.core.view.DisplayCutoutCompat; | import androidx.core.view.DisplayCutoutCompat; | ||||||
| import androidx.core.view.ViewCompat; | import androidx.core.view.ViewCompat; | ||||||
| @@ -2225,7 +2226,7 @@ public final class Player implements | |||||||
|             Log.d(TAG, "ExoPlayer - onRepeatModeChanged() called with: " |             Log.d(TAG, "ExoPlayer - onRepeatModeChanged() called with: " | ||||||
|                     + "repeatMode = [" + repeatMode + "]"); |                     + "repeatMode = [" + repeatMode + "]"); | ||||||
|         } |         } | ||||||
|         setRepeatModeButton(binding.repeatButton, repeatMode); |         setRepeatModeButton(((AppCompatImageButton) binding.repeatButton), repeatMode); | ||||||
|         onShuffleOrRepeatModeChanged(); |         onShuffleOrRepeatModeChanged(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -2253,7 +2254,7 @@ public final class Player implements | |||||||
|         NotificationUtil.getInstance().createNotificationIfNeededAndUpdate(this, false); |         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) { |         switch (repeatMode) { | ||||||
|             case REPEAT_MODE_OFF: |             case REPEAT_MODE_OFF: | ||||||
|                 imageButton.setImageResource(R.drawable.exo_controls_repeat_off); |                 imageButton.setImageResource(R.drawable.exo_controls_repeat_off); | ||||||
|   | |||||||
| @@ -513,7 +513,7 @@ | |||||||
|                 android:scaleType="fitXY" |                 android:scaleType="fitXY" | ||||||
|                 app:srcCompat="@drawable/ic_close" /> |                 app:srcCompat="@drawable/ic_close" /> | ||||||
|  |  | ||||||
|             <ImageButton |             <androidx.appcompat.widget.AppCompatImageButton | ||||||
|                 android:id="@+id/repeatButton" |                 android:id="@+id/repeatButton" | ||||||
|                 android:layout_width="50dp" |                 android:layout_width="50dp" | ||||||
|                 android:layout_height="50dp" |                 android:layout_height="50dp" | ||||||
| @@ -527,8 +527,8 @@ | |||||||
|                 android:focusable="true" |                 android:focusable="true" | ||||||
|                 android:padding="10dp" |                 android:padding="10dp" | ||||||
|                 android:scaleType="fitXY" |                 android:scaleType="fitXY" | ||||||
|                 android:src="@drawable/exo_controls_repeat_off" |  | ||||||
|                 android:tint="?attr/colorAccent" |                 android:tint="?attr/colorAccent" | ||||||
|  |                 app:srcCompat="@drawable/exo_controls_repeat_off" | ||||||
|                 tools:ignore="ContentDescription,RtlHardcoded" /> |                 tools:ignore="ContentDescription,RtlHardcoded" /> | ||||||
|  |  | ||||||
|             <androidx.appcompat.widget.AppCompatImageButton |             <androidx.appcompat.widget.AppCompatImageButton | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 krlvm
					krlvm