From 8045b3cf7934d26700ad2e1fd7cbe3bb9afcbf5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 4 Mar 2026 12:44:12 +0100 Subject: [PATCH] Improve the look of the status bar on modern Android (no shadow). --- android/res/values-v28/styles.xml | 1 - android/src/org/ppsspp/ppsspp/PpssppActivity.java | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/android/res/values-v28/styles.xml b/android/res/values-v28/styles.xml index f82b1df63b..b04f1ee730 100644 --- a/android/res/values-v28/styles.xml +++ b/android/res/values-v28/styles.xml @@ -6,7 +6,6 @@ true @color/black shortEdges - true diff --git a/android/src/org/ppsspp/ppsspp/PpssppActivity.java b/android/src/org/ppsspp/ppsspp/PpssppActivity.java index 2aa3dac22b..f7763dcecf 100644 --- a/android/src/org/ppsspp/ppsspp/PpssppActivity.java +++ b/android/src/org/ppsspp/ppsspp/PpssppActivity.java @@ -619,19 +619,23 @@ public class PpssppActivity extends AppCompatActivity implements SensorEventList @SuppressLint("InlinedApi") private void updateSystemUiVisibility() { Window window = getWindow(); - int orientation = getResources().getConfiguration().orientation; WindowInsetsControllerCompat controller = WindowCompat.getInsetsController(getWindow(), getWindow().getDecorView()); - window.setStatusBarColor(Color.TRANSPARENT); - window.setNavigationBarColor(0x80000000); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { // Tell Android to use light icons on the bars. controller.setAppearanceLightStatusBars(false); controller.setAppearanceLightNavigationBars(false); } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + // This tells Android to not add any automatic shadows. + window.setStatusBarContrastEnforced(false); + window.setNavigationBarContrastEnforced(true); // we do want this on the nav bar, for now. + } + + window.setStatusBarColor(Color.TRANSPARENT); + window.setNavigationBarColor(0x80000000); controller.setSystemBarsBehavior( WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE