Janusz Janusz - 1 year ago 63
Android Question

How to listen for a WebView finishing loading a URL?

I have a

that is loading a page from the Internet. I want to show a
until the loading is complete.

How do I listen for the completion of page loading of a

ian ian
Answer Source

Just implement WebViewClient and extend onPageFinished() as follows:

mWebView.setWebViewClient(new WebViewClient() {

   public void onPageFinished(WebView view, String url) {
        // do your stuff here