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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
@@ -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
|
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
|
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.
|
`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`).
|
- 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
|
Upstream's fourth part was its CI build number; the version code keeps the x100000 factor so it
|
||||||
never falls below codes already installed.
|
never falls below codes already installed.
|
||||||
|
|||||||
+2
-2
@@ -34,8 +34,8 @@ android {
|
|||||||
applicationId "com.stinnesbeck.nilsmg4"
|
applicationId "com.stinnesbeck.nilsmg4"
|
||||||
minSdk 27
|
minSdk 27
|
||||||
targetSdk 36
|
targetSdk 36
|
||||||
versionCode 67
|
versionCode 68
|
||||||
versionName "2.8.1"
|
versionName "2.8.2"
|
||||||
|
|
||||||
// Nothing about the server ships in the APK: its URL and ingest token are entered in
|
// 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.
|
// the app's Server tab (ServerConfig), and the database is only reachable by the server.
|
||||||
|
|||||||
@@ -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
|
* 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
|
* own (climate strip, hazard and home shortcuts); if the platform keeps them, these flags
|
||||||
* simply have no effect.
|
* 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
|
@SuppressWarnings("deprecation") // the WindowInsetsController API starts at 30; this is 28
|
||||||
private void applyFullScreen() {
|
private void applyFullScreen() {
|
||||||
View decor = getWindow().getDecorView();
|
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
|
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_HIDE_NAVIGATION
|
||||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||||
|
|||||||
Reference in New Issue
Block a user