问题
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
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?
回答1:
Answering my own question, looks like Google fixed the issue https://issuetracker.google.com/issues/37124582
with https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0-alpha03 Fixed WebView resets DayNight Resources
来源:https://stackoverflow.com/questions/57515961/webview-resetting-uimode-and-breaking-dark-theme