在某些 Android Oreo 设备上,当我第一次在 webview 上加载 url 时,URL 页面会正确加载。但是,当我再次加载 URL 时,页面会缩小。在低于 android oreo 的设备上,页面可以为所有设备正确加载。
此外,当您在后台终止应用程序并再次加载时,URL 会正确加载。在第二次和后续尝试中,它再次显示缩小的版本。我在下面附上了加载的 URL 的图像
Below is the correct loading of webpage on the webview
Below is the small display of webpage on webview webview
Android XML 代码:
<WebView
android:id="@+id/content_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Java代码:
private WebView mWebView;
mWebView = (WebView) view.findViewById(R.id.content_view);
mWebView.loadUrl("https://policies.google.com/");
URL: https://policies.google.com/ http://policies.google.com/
请注意,这种情况也会发生在其他 URL 中。https://policies.google.com/ http://policies.google.com/这只是一个例子
它适用于以下方面:
华为nova 2i RNE-L22,安卓8.0.0
它不适用于以下情况
安卓8.1.0;像素2
安卓8.0.0;三星 SM-G950FD
安卓8.0.1;华为 P20 EML-L29
对于为什么会发生这种情况有什么建议或原因吗?如何解决这个问题?
提前致谢。