I have a WebView Activity that sometimes doesn’t load up properly due to a disconnected or poor WIFI/DATA connection. I imagine this is more than likely to happen in the real world once my app is deployed. My question is how can I replace this ugly error with something more pretty?
Also, do you have any other tips for getting my WebView Activity to NOT resemble a browser?
For example, instead of a white screen showing up while the WebView is loading, how can I show a loading icon during this moment?
Thanks a lot.
When a page is not found the page returns a 404 error, what you need to do is handle it.
This can be done by setting a
WebViewClientand overridingonReceivedErrormethod.You can Try something like this :