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
If you want show a progress bar you need to listen for a progress change event, not just for the completion of page:
mWebView.setWebChromeClient(new WebChromeClient(){
@Override
public void onProgressChanged(WebView view, int newProgress) {
//change your progress bar
}
});
BTW if you want display just an Indeterminate ProgressBar overriding the method onPageFinished is enough