CustomWebView
CustomWebView copied to clipboard
Beta: Dark Mode doesn't work on Android 13+
SetDarkMode in the beta version is using the setForceDark
function of Webview which isn't supported as of Android 13. Looks like we should be using setAlgorithmicDarkeningAllowed
instead.
See the note below:
The deprecated [setForceDark](https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#setForceDark(android.webkit.WebSettings,int)) and related API are no-ops in apps with targetSdkVersion ≥ [TIRAMISU](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#TIRAMISU()), but they still apply to apps with targetSdkVersion<[TIRAMISU](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#TIRAMISU()).
More available here.