From 3671de19695dacc339725730a4ed28a1da8a79fd Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Sat, 18 Jul 2026 20:36:54 +0200 Subject: [PATCH] fix(android): keep system bars transparent so the webview strips color them on all versions --- .../app/src/main/java/moe/sable/client/MainActivity.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src-tauri/gen/android/app/src/main/java/moe/sable/client/MainActivity.kt b/src-tauri/gen/android/app/src/main/java/moe/sable/client/MainActivity.kt index 2b691d3fa..7130a13a3 100644 --- a/src-tauri/gen/android/app/src/main/java/moe/sable/client/MainActivity.kt +++ b/src-tauri/gen/android/app/src/main/java/moe/sable/client/MainActivity.kt @@ -23,25 +23,24 @@ class MainActivity : TauriActivity() { companion object { private var instance: MainActivity? = null - // Called from Rust (JNI) to tint the status bar and adapt icon contrast. + // Bars stay transparent (edge-to-edge plugin) so the webview strips supply the color + // on every version; these only adapt icon contrast. setStatusBarColor/setNavigationBarColor + // are no-ops under enforced edge-to-edge on Android 15+, so we avoid them. @JvmStatic fun setStatusBarColorNative(color: Int) { val activity = instance ?: return activity.runOnUiThread { val window = activity.window - window.statusBarColor = color WindowCompat.getInsetsController(window, window.decorView).isAppearanceLightStatusBars = isLight(color) } } - // Called from Rust (JNI) to tint the navigation bar and adapt icon contrast. @JvmStatic fun setNavigationBarColorNative(color: Int) { val activity = instance ?: return activity.runOnUiThread { val window = activity.window - window.navigationBarColor = color WindowCompat.getInsetsController(window, window.decorView).isAppearanceLightNavigationBars = isLight(color) }