Search code examples
androidwebviewscreenloading

How to manage the Blank White Loading screen of an Android Webview?


This is more of a visual thing than a direct issue, but when a WebView loads in my application, the screen is blank white for between 2-4 seconds until the content is fully loaded. The time is dependent on the size of content that is loading.

Is there a way to manage this, so that the screen will only refresh to the content when loaded? Something like a "loading..." animation or something similar? I just do not want the plain white screen presented to my users.

I have a splash screen that then loads the WebView. The WebView works fine after that initial blank pause (while loading), but I would like to hold it on a particular screen until the page has loaded or have a black screen with a progress loader.

Is there something that detects a load complete perhaps? If that were the case, I could use it as a trigger.

Does anyone know of a way to manage this blank white screen?

Thanks!

/r


Solution

  • Maybe you can take a look at this previous issue.

    How to listen for a WebView finishing loading a URL?