Updated AndroidX

This commit is contained in:
M66B
2022-11-09 22:28:59 +01:00
parent a6f39a1fac
commit 39eb835d73
6 changed files with 12 additions and 12 deletions

View File

@@ -124,7 +124,7 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
// https://developer.android.com/reference/android/webkit/WebSettings#setAlgorithmicDarkeningAllowed(boolean)
// https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
boolean canDarken = WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING);
if (canDarken && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
if (canDarken)
WebSettingsCompat.setAlgorithmicDarkeningAllowed(settings, dark && !force_light);
setBackgroundColor(canDarken && dark && !force_light ? Color.TRANSPARENT : Color.WHITE);