From 318fef4880373fe5c12c366cd8b1c322771714e6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 27 Sep 2026 23:58:44 -0700 Subject: The Android app's system bars follow the system theme, and the page's theme colour follows the app's. One dark colour for both bars gave white navigation icons over a light page under gesture navigation. The wrapper (1.9, versionCode 10) now uses the page background in light mode and the dark theme colour in dark mode, for the status bar and the navigation bar alike. The page updates its theme-color meta when its own theme is applied, so a PWA's status bar and the wrapper's follow the same switch. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01VhUKyXKtsJ67QAFfb7QR9D --- android/app/build.gradle | 4 ++-- android/app/src/main/AndroidManifest.xml | 8 ++++---- android/app/src/main/res/values/colors.xml | 12 ++++++++---- build.js | 2 +- src/app.js | 9 ++++++++- static/coinos.apk | Bin 435555 -> 436323 bytes 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5fa19ba..928f12d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -29,8 +29,8 @@ android { applicationId 'io.coinos.app' minSdk 24 targetSdk 35 - versionCode 9 - versionName '1.8' + versionCode 10 + versionName '1.9' } // Two builds of the same wallet. // diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 36f9d1e..b0dddbd 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -31,20 +31,20 @@ android:name="android.support.customtabs.trusted.DEFAULT_URL" android:value="https://v3.coinos.io/" /> + white. Light follows the page background, dark the PWA's + theme_color, so the bar icons keep their contrast either way. --> + android:resource="@color/statusBarColorDark" /> + android:resource="@color/navigationBarColorDark" /> diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml index 42e2db8..d444318 100644 --- a/android/app/src/main/res/values/colors.xml +++ b/android/app/src/main/res/values/colors.xml @@ -1,8 +1,12 @@ #FFFFFF - - #15171A - #15171A + + #EEF0F3 + #EEF0F3 + #15171A + #15171A diff --git a/build.js b/build.js index 3993d08..c90e527 100644 --- a/build.js +++ b/build.js @@ -376,7 +376,7 @@ async function pageHtml({ css, staging, pwa, scriptHtml }) { ${staging ? 'Coinos Staging' : 'Coinos'} - + ${pwa ? PWA_HEAD : ''} diff --git a/src/app.js b/src/app.js index 267c18e..cb6a030 100644 --- a/src/app.js +++ b/src/app.js @@ -386,7 +386,14 @@ function resolvedTheme() { return 'light'; } function applyTheme() { - try { document.documentElement.dataset.theme = resolvedTheme(); } catch {} + try { + const th = resolvedTheme(); + document.documentElement.dataset.theme = th; + // the browser's status bar (a PWA, or the Android app) takes its colour + // from here: the page background in light, the dark theme colour in dark + const meta = document.querySelector('meta[name="theme-color"]'); + if (meta) meta.setAttribute('content', th === 'dark' ? '#15171a' : '#eef0f3'); + } catch {} } function toggleTheme() { try { localStorage.setItem(THEME_KEY, resolvedTheme() === 'dark' ? 'light' : 'dark'); } catch {} diff --git a/static/coinos.apk b/static/coinos.apk index 7a30775..7958b18 100644 Binary files a/static/coinos.apk and b/static/coinos.apk differ -- cgit v1.2.3