Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 365
Robbe Avatar asked Mar 14 '11 20:03

Robbe


1 Answers

You could alternatively make the webview transparent:

webview.setBackgroundColor(0x00000000); 
like image 76
Lawrence Cherone Avatar answered Oct 15 '22 08:10

Lawrence Cherone