简体   繁体   中英

Prevent Android Webview to show blank screen while navigating

I created an Android WebView app. Right now, I am facing 1-2 seconds of blank screen when navigate between pages. I cache all the resource (js, css, html), but it still show me the blank screen for few hundred milliseconds. It is very quick, but the blank screen still noticeable.

Is there any way to skip or hold the transition screen? Like prevent the page to refresh until all DOM and resources are fully loaded.

Make it into a single-page app! Control the transitions yourself with AJAX (or an framework that abstracts it). This way you can load the site content and only update it when it is done loading (or add your own loader animation)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM