On my Nougat device, the webview inside RecyclerView is sometimes empty. When I scroll slowly and then return to the content of the web content, it disappears. On devices under Android N. there are no problems. Android N uses Chrome as the default browser for apps. So I thought that there might be a bug in Chrome, so I am also raising a bug in the Chrome portal. There are a couple of related issues in SO, but this did not solve my problem. So, is there a way to set up Android webview that can solve this problem? I wrote a detailed description in the link with the error.
Error link: click here
My onBindViewHolder method code for WebView
final VHItem vhItem = (VHItem) holder; vhItem.webViewChild.getSettings().setUseWideViewPort(false); vhItem.webViewChild.getSettings().setJavaScriptEnabled(true); vhItem.webViewChild.loadData("<body>" + html + "</body>", "text/html;charset=utf-8", "utf-8");
Where
html is the html string
Update
They fixed the problem. If you're still experiencing the same issue, try upgrading the Chrome version of Chrome to 61 or higher.
android google-chrome webview
Kunu
source share