How to listen for a WebView finishing loading a URL?
android, android-webview
Solution
Extend WebViewClient and call onPageFinished() as follows:
mWebView.setWebViewClient(new WebViewClient() {
public void onPageFinished(WebView view, String url) {
// do your stuff here
}
});
Problem
I have a `WebView` that is loading a page from the Internet. I want to show a `ProgressBar` until the loading is complete. How do I listen for the completion of page loading of a `WebView`?