From a1228edb048a116adaa01e4daac033bcdad35798 Mon Sep 17 00:00:00 2001 From: ScreenOperator Bot Date: Thu, 23 Jul 2026 07:05:50 +0000 Subject: [PATCH] Fix: prevent WebView reset on dark/light mode switch Added android:configChanges=uiMode (plus orientation/screenSize/ screenLayout/keyboardHidden) to MainActivity so the Activity is not recreated when the system switches between dark and light theme. Previously the activity restarted on theme change, causing onCreate to refetch and reload the remote HTML into the WebView, which reset navigation back to the main page. --- app/src/main/AndroidManifest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0dee21c4..92bc8836 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -45,7 +45,8 @@ android:label="@string/app_name" android:theme="@style/Theme.Emptything" android:launchMode="singleTop" - android:windowSoftInputMode="adjustResize"> + android:windowSoftInputMode="adjustResize" + android:configChanges="uiMode|orientation|screenSize|screenLayout|keyboardHidden">