You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/03/18 17:00:51 UTC
[GitHub] [cordova-android] timbru31 commented on issue #897: Dark Mode Android
timbru31 commented on issue #897:
URL: https://github.com/apache/cordova-android/issues/897#issuecomment-802112111
You might want to check out this plugin, too:
> While Android supports a dark mode since API level 29 (Android 10), Android WebView's need explicit support for this. This plugin changes the used Cordova WebView, no matter if the default from cordova-android or a custom one such as the cordova-plugin-ionic-webview to enable or disable the dark mode. This results in a correct usage of the (prefers-color-scheme: dark) media query.
Additionally, when the native configuration changes, it is re-evaluated whether the dark mode is currently active.
Under the hood, the Configuration.UI_MODE_NIGHT_YES, WebSettingsCompat.setForceDark and WebSettingsCompat.setForceDarkStrategy are used. You can read more here: developer.android.com/guide/webapps/dark-theme
https://github.com/timbru31/cordova-plugin-android-dark-mode-support
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org