generated from JetBrains/compose-multiplatform-template
-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
On Android, the WebView consistently renders pages in dark mode, even if the phone is set to light mode. On iOS, it correctly respects the system theme (light/dark).
Steps to reproduce
-
Create a Compose Multiplatform project using the Wizard:
https://terrakok.github.io/Compose-Multiplatform-Wizard/ -
Add the
compose-webview-multiplatform
dependency. -
On Android, ensure you have the Internet permission declared in
AndroidManifest.xml
:<uses-permission android:name="android.permission.INTERNET" />
-
In shared code (common module), use the following:
val state = rememberWebViewState("https://github.com/KevinnZou/compose-webview-multiplatform") WebView(state, modifier = Modifier.fillMaxSize())
-
Run the app on an Android device/emulator configured for light mode.
Observed Behavior (Android)
- The webpage is rendered in dark mode, despite the system being in light mode.
Expected Behavior
-
The WebView should either:
- Respect the system theme (light/dark), or at least
- Not force dark mode when the system is set to light.
Platforms
- Android: issue reproducible
- iOS: behaves correctly (follows system theme)
Metadata
Metadata
Assignees
Labels
No labels