Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
[Comment deleted]
ae...@gmail.com <ae...@gmail.com> #3
We're still trying to work out if we can work around this in the library.
In the mean-time, if you know that you are going to create a WebView in an Activity, you can do the following:
protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= 24) {
new WebView(this);
}
super.onCreate(savedInstanceState);
}
In the mean-time, if you know that you are going to create a WebView in an Activity, you can do the following:
protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= 24) {
new WebView(this);
}
super.onCreate(savedInstanceState);
}
da...@google.com <da...@google.com>
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #4
alternatively you were able to get it to work by capturing the configuration prior to inflating a webview and restoring it after
Configuration oldConfig = getCurrentConfig();
//**inflate webview here**
restoreConfig(oldConfig);
Configuration getCurrentConfig() {
return new Configuration(activity.getResources().getConfiguration());
}
void restoreConfig(@Nullable Configuration configuration) {
//if the config isn't null, a webview was inflated and we should update the configuration to
//the previous one to prevent nightmode from being reset by webview inflation
if (configuration != null) {
activity.getResources().updateConfiguration(configuration, null);
}
}
Configuration oldConfig = getCurrentConfig();
//**inflate webview here**
restoreConfig(oldConfig);
Configuration getCurrentConfig() {
return new Configuration(activity.getResources().getConfiguration());
}
void restoreConfig(@Nullable Configuration configuration) {
//if the config isn't null, a webview was inflated and we should update the configuration to
//the previous one to prevent nightmode from being reset by webview inflation
if (configuration != null) {
activity.getResources().updateConfiguration(configuration, null);
}
}
na...@google.com <na...@google.com> #5
#3: That can work, but you don't want to do that on EVERY WebView inflate, only the first. My workaround is #2 is a one-time call.
Description
In this block :
After wrapped in here , data flow couldn't receive any change, neither any invalidation observer.
immediateTransaction
, which mentionedIn pure Room without KMP, multiple DAO operations normally wrapped in
database.withTransaction
block. How to do in KMP?