1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-04-18 04:41:24 +00:00

Fix Light Player Popups in Dark Theme, make Player Controls Overlay always Dark

This commit is contained in:
krlvm
2021-03-28 18:48:51 +03:00
parent 609d09a8e2
commit 0afdac5683
8 changed files with 37 additions and 20 deletions

View File

@@ -26,6 +26,7 @@ import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -446,9 +447,12 @@ public final class Player implements
binding.playbackSeekBar.getProgressDrawable()
.setColorFilter(new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.MULTIPLY));
qualityPopupMenu = new PopupMenu(context, binding.qualityTextView);
final ContextThemeWrapper themeWrapper = new ContextThemeWrapper(getContext(),
R.style.DarkPopupMenu);
qualityPopupMenu = new PopupMenu(themeWrapper, binding.qualityTextView);
playbackSpeedPopupMenu = new PopupMenu(context, binding.playbackSpeed);
captionPopupMenu = new PopupMenu(context, binding.captionTextView);
captionPopupMenu = new PopupMenu(themeWrapper, binding.captionTextView);
binding.progressBarLoadingPanel.getIndeterminateDrawable()
.setColorFilter(new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY));