From 8c5e7373d38c0ef4accdd7780cf6181164d60cbc Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 28 Nov 2026 00:44:01 +0100 Subject: [PATCH] fix(android): paint the warm ground on a drawable of its own, so the window gets its theme colour back Recolouring the decor view changed the theme's own colour drawable in place, so restoring it once the server's page was up handed the window the warm ground again. --- .../app/src/main/java/com/liketrek/trek/MainActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java b/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java index 34edf5d33..213270a93 100644 --- a/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java +++ b/client/android/app/src/main/java/com/liketrek/trek/MainActivity.java @@ -2,6 +2,7 @@ package com.liketrek.trek; import android.content.Intent; import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.os.Bundle; @@ -71,7 +72,9 @@ public class MainActivity extends BridgeActivity { // where it lays the page out between the bars (native/appBoot.ts). if (!onServer || restarting) { Drawable windowBackground = getWindow().getDecorView().getBackground(); - getWindow().getDecorView().setBackgroundColor(SHELL_PAGE); + // A new drawable: setBackgroundColor would recolour the theme's own one, + // and the restore below would hand the window the warm ground back. + getWindow().getDecorView().setBackground(new ColorDrawable(SHELL_PAGE)); bridge.getWebView().setBackgroundColor(SHELL_PAGE); // Once the server's page is up, the window is the one a normal launch // has, so the status bar of an older WebView follows the system again.