diff --git a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java index 8cd1a3a16..709dac368 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -92,7 +92,8 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte tabLayout = rootView.findViewById(R.id.main_tab_layout); viewPager = rootView.findViewById(R.id.pager); - tabLayout.setTabIconTint(ColorStateList.valueOf(ThemeHelper.resolveColorFromAttr(requireContext(), R.attr.colorAccent))); + tabLayout.setTabIconTint(ColorStateList.valueOf( + ThemeHelper.resolveColorFromAttr(requireContext(), R.attr.colorAccent))); tabLayout.setupWithViewPager(viewPager); tabLayout.addOnTabSelectedListener(this); diff --git a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java index c06ef87f3..943d685b1 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BackgroundPlayer.java @@ -201,9 +201,10 @@ public final class BackgroundPlayer extends Service { } private NotificationCompat.Builder createNotification() { - notRemoteView = new RemoteViews(BuildConfig.APPLICATION_ID, R.layout.player_notification); + notRemoteView = new RemoteViews(BuildConfig.APPLICATION_ID, + R.layout.player_background_notification); bigNotRemoteView = new RemoteViews(BuildConfig.APPLICATION_ID, - R.layout.player_notification_expanded); + R.layout.player_background_notification_expanded); setupNotification(notRemoteView); setupNotification(bigNotRemoteView); @@ -655,7 +656,7 @@ public final class BackgroundPlayer extends Service { super.onPlaying(); resetNotification(); updateNotificationThumbnail(); - updateNotification(R.drawable.ic_pause_white_24dp); + updateNotification(R.drawable.exo_controls_pause); } @Override @@ -663,7 +664,7 @@ public final class BackgroundPlayer extends Service { super.onPaused(); resetNotification(); updateNotificationThumbnail(); - updateNotification(R.drawable.ic_play_arrow_white_24dp); + updateNotification(R.drawable.exo_controls_play); } @Override diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index 93e31f831..87b8f282e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -53,6 +53,7 @@ import android.widget.SeekBar; import android.widget.TextView; import androidx.annotation.NonNull; +import androidx.appcompat.content.res.AppCompatResources; import androidx.core.app.NotificationCompat; import com.google.android.exoplayer2.C; @@ -892,7 +893,7 @@ public final class PopupVideoPlayer extends Service { public void onBlocked() { super.onBlocked(); resetNotification(); - updateNotification(R.drawable.ic_play_arrow_white_24dp); + updateNotification(R.drawable.exo_controls_play); } @Override @@ -902,9 +903,10 @@ public final class PopupVideoPlayer extends Service { updateWindowFlags(ONGOING_PLAYBACK_WINDOW_FLAGS); resetNotification(); - updateNotification(R.drawable.ic_pause_white_24dp); + updateNotification(R.drawable.exo_controls_pause); - videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white_24dp); + videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(), + R.drawable.ic_pause_white_24dp)); hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME); startForeground(NOTIFICATION_ID, notBuilder.build()); @@ -914,7 +916,7 @@ public final class PopupVideoPlayer extends Service { public void onBuffering() { super.onBuffering(); resetNotification(); - updateNotification(R.drawable.ic_play_arrow_white_24dp); + updateNotification(R.drawable.exo_controls_play); } @Override @@ -924,8 +926,9 @@ public final class PopupVideoPlayer extends Service { updateWindowFlags(IDLE_WINDOW_FLAGS); resetNotification(); - updateNotification(R.drawable.ic_play_arrow_white_24dp); - videoPlayPause.setBackgroundResource(R.drawable.ic_play_arrow_white_24dp); + updateNotification(R.drawable.exo_controls_play); + videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(), + R.drawable.ic_play_arrow_white_24dp)); stopForeground(false); } @@ -934,9 +937,10 @@ public final class PopupVideoPlayer extends Service { public void onPausedSeek() { super.onPausedSeek(); resetNotification(); - updateNotification(R.drawable.ic_play_arrow_white_24dp); + updateNotification(R.drawable.exo_controls_play); - videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white_24dp); + videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(), + R.drawable.ic_pause_white_24dp)); } @Override @@ -947,7 +951,8 @@ public final class PopupVideoPlayer extends Service { resetNotification(); updateNotification(R.drawable.ic_replay_white_24dp); - videoPlayPause.setBackgroundResource(R.drawable.ic_replay_white_24dp); + videoPlayPause.setBackground(AppCompatResources.getDrawable(getApplicationContext(), + R.drawable.ic_replay_white_24dp)); stopForeground(false); } diff --git a/app/src/main/res/drawable-hdpi/ic_close_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_close_white_24dp.png new file mode 100644 index 000000000..ceb1a1eeb Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_close_white_24dp.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_replay_white_24dp.png b/app/src/main/res/drawable-hdpi/ic_replay_white_24dp.png new file mode 100644 index 000000000..fcddcf02d Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_replay_white_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_close_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_close_white_24dp.png new file mode 100644 index 000000000..af7f8288d Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_close_white_24dp.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_replay_white_24dp.png b/app/src/main/res/drawable-mdpi/ic_replay_white_24dp.png new file mode 100644 index 000000000..3b4191325 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_replay_white_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png new file mode 100644 index 000000000..b7c7ffd0e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_replay_white_24dp.png b/app/src/main/res/drawable-xhdpi/ic_replay_white_24dp.png new file mode 100644 index 000000000..1573fb111 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_replay_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png new file mode 100644 index 000000000..6b717e0dd Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp.png b/app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp.png new file mode 100644 index 000000000..5105c2251 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_replay_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp.png new file mode 100644 index 000000000..396419219 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_close_white_24dp.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_replay_white_24dp.png b/app/src/main/res/drawable-xxxhdpi/ic_replay_white_24dp.png new file mode 100644 index 000000000..04cbde9af Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_replay_white_24dp.png differ diff --git a/app/src/main/res/drawable/ic_close_white_24dp.xml b/app/src/main/res/drawable/ic_close_white_24dp.xml deleted file mode 100644 index 0c8775c4e..000000000 --- a/app/src/main/res/drawable/ic_close_white_24dp.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_replay_white_24dp.xml b/app/src/main/res/drawable/ic_replay_white_24dp.xml deleted file mode 100644 index 061877e0a..000000000 --- a/app/src/main/res/drawable/ic_replay_white_24dp.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/app/src/main/res/layout/player_notification.xml b/app/src/main/res/layout/player_background_notification.xml similarity index 95% rename from app/src/main/res/layout/player_notification.xml rename to app/src/main/res/layout/player_background_notification.xml index d356aa774..e04d72f7d 100644 --- a/app/src/main/res/layout/player_notification.xml +++ b/app/src/main/res/layout/player_background_notification.xml @@ -59,7 +59,7 @@ android:focusable="true" android:padding="5dp" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_repeat_white_24dp" + android:src="@drawable/exo_controls_repeat_all" tools:ignore="ContentDescription"/> diff --git a/app/src/main/res/layout/player_notification_expanded.xml b/app/src/main/res/layout/player_background_notification_expanded.xml similarity index 97% rename from app/src/main/res/layout/player_notification_expanded.xml rename to app/src/main/res/layout/player_background_notification_expanded.xml index 34e9ff726..e5a9b632b 100644 --- a/app/src/main/res/layout/player_notification_expanded.xml +++ b/app/src/main/res/layout/player_background_notification_expanded.xml @@ -29,7 +29,7 @@ android:focusable="true" android:padding="8dp" android:scaleType="fitCenter" - app:srcCompat="@drawable/ic_close_white_24dp" + android:src="@drawable/ic_close_white_24dp" tools:ignore="ContentDescription,RtlHardcoded"/> @@ -114,7 +114,7 @@ android:clickable="true" android:focusable="true" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_repeat_white_24dp" + android:src="@drawable/exo_controls_repeat_all" tools:ignore="ContentDescription"/> \ No newline at end of file