From 1b918e3c397ca4296e072333797f89d73e7c62dd Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Sun, 18 Oct 2026 00:00:58 +0200 Subject: [PATCH] App 2.8.2: full screen fills the space the bars leave On the MG4 the immersive flags hid SAIC's bars but left a black band where they had been. SYSTEM_UI_FLAG_LAYOUT_STABLE reports the bars' insets even while they are hidden, and the fitsSystemWindows root padded itself by them. In full screen the flag is dropped and the root no longer fits system windows; switching full screen off restores both. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki --- SPECS.md | 3 +++ app/build.gradle | 4 ++-- .../main/java/com/evsuite/abrp/MainActivity.java | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/SPECS.md b/SPECS.md index 7384c96..ce32a63 100644 --- a/SPECS.md +++ b/SPECS.md @@ -114,6 +114,9 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does * INGEST_TOKEN) into git and pushed it. Commit amended and force-pushed; both values regenerated in the now gitignored `k8s/secrets.yaml` (since moved to `k8s/secrets/secrets.yaml`, outside `kubectl apply -f k8s/`). Filled-in secrets live only there from now on. +- 2026-10-18 — App 2.8.2: full screen uses the whole display. The MG4 hid its bars but left a black + band where they were: LAYOUT_STABLE kept reporting the bars' insets and the fitsSystemWindows root + padded for them. Both are off in full screen now. - 2026-10-17 — App 2.8.1: three-part version names (`2.8.1-unstable`, `NilsMG4-unstable-2.8.1.apk`). Upstream's fourth part was its CI build number; the version code keeps the x100000 factor so it never falls below codes already installed. diff --git a/app/build.gradle b/app/build.gradle index 663cecf..30a0a16 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,8 +34,8 @@ android { applicationId "com.stinnesbeck.nilsmg4" minSdk 27 targetSdk 36 - versionCode 67 - versionName "2.8.1" + versionCode 68 + versionName "2.8.2" // Nothing about the server ships in the APK: its URL and ingest token are entered in // the app's Server tab (ServerConfig), and the database is only reachable by the server. diff --git a/app/src/main/java/com/evsuite/abrp/MainActivity.java b/app/src/main/java/com/evsuite/abrp/MainActivity.java index 44fa0b0..6dc5165 100644 --- a/app/src/main/java/com/evsuite/abrp/MainActivity.java +++ b/app/src/main/java/com/evsuite/abrp/MainActivity.java @@ -321,13 +321,23 @@ public class MainActivity extends AppCompatActivity { * in front, and a swipe from the edge shows them briefly. On the MG4 those bars are SAIC's * own (climate strip, hazard and home shortcuts); if the platform keeps them, these flags * simply have no effect. + * + * The content takes the space the bars leave: no LAYOUT_STABLE (it reports the bars' insets + * even while they are hidden), and the root stops padding itself for them. On the MG4 that + * padding stayed as a black band where the bars had been (2.8.1). */ @SuppressWarnings("deprecation") // the WindowInsetsController API starts at 30; this is 28 private void applyFullScreen() { View decor = getWindow().getDecorView(); - if (UploadSettings.fullScreen(prefs)) { + boolean full = UploadSettings.fullScreen(prefs); + View root = findViewById(R.id.app_root); + if (root != null) { + root.setFitsSystemWindows(!full); + if (full) root.setPadding(0, 0, 0, 0); + root.requestApplyInsets(); + } + if (full) { decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY - | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION