Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(android): paint the warm ground on a drawable of its own, so the window gets its theme colour back

Maurice8c5e7373d38c
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.