I am draw some canvas charts on the android webview, and use javascript to change chart just by hiding and showing, and also change the title by reset its innerHTML.
The title is just a normal html tag "<div id='title'></div>"
,
The problem is that the page does not render well when I switch charts, for example. when I choosed to display the next chart and change the title's innerHTML, the title seems 'remembered' its previous innerHTML and it looks like one text overlapped another.
If I manually change my phone's orientation, it seems make the webview redraw its content (not refresh), then everything will be fine.
Any idea on this? or can I simulate the orientation change event to make my webview redraw its page to work around it?
The Android system webview custom cache file has been deprecated and removed in Android 13. New apps and any app updates will now use the operating system default cache location.
On Android 7.0, 8.0 and 9.0, Google Chrome handles the embedded browsing functions. On other Android OS versions, web app performance may suffer without WebView enabled.
Alternatives to WebView If you want to send users to a mobile site, build a progressive web app (PWA). If you want to display third-party web content, send an intent to installed web browsers. If you want to avoid leaving your app to open the browser, or if you want to customize the browser's UI, use Custom Tabs.
May 18, 2021•HSM ArticleGo to settings > apps and select Chrome application. Tap on Disable (this will disable the chrome browser) Go to Google PlayStore and search for webview. Tap on Android System Webview in the search results.
This issue seems to come up when you are using a transparent background with your webview. Try adding this into your CSS:
body {
background-color:black;
}
Or whatever you wish your background color to be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With