WebView重置UiMode并打破黑暗主题 [英] WebView resetting UiMode and breaking dark theme

查看:162
本文介绍了WebView重置UiMode并打破黑暗主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用依靠AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)来使我们从values/colorsvalues-night/colors

Our app relies on AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) to make us pick up Light and Dark theme colors from values/colors and values-night/colors

但是每次我们尝试使用WebView时,都会从重置UiMode开始,我们的应用程序会感到困惑,哪些颜色值适合我们的主题

But every time we try to use the WebView, it starts by resetting the UiMode and our app gets confused which color values to pick for our themes

有人详细讨论了该问题,此处

Some people discussed the issue in detail here and here

有人在那里遇到类似的问题吗?

Anyone out there run into a similar issue?

推荐答案

回答我自己的问题,看起来Google修复了问题

Answering my own question, looks like Google fixed the issue https://issuetracker.google.com/issues/37124582

带有 https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0-alpha03 Fixed WebView resets DayNight Resources

这篇关于WebView重置UiMode并打破黑暗主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆