KnightCavalry
KnightCavalry

Reputation: 387

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.

Upvotes: 1

Views: 799

Answers (1)

Michiel Dral
Michiel Dral

Reputation: 4067

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)

Upvotes: 2

Related Questions