I have an activity that shows a ProgressDialog at start up which should disappear when the page on the WebView has finished loading. I put a Log on the onPageFinished and the progbar.dissmiss() but only the Log is working and the ProgressBar is still there. my code is this:
ProgressDialog progbar;
progbar = ProgressDialog.show(SchoolActivity.this, "", "Loading...");
wv.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(wv, link);
Log.d("log","Finished!!!");
progbar.dismiss();
}
}
});
wv.loadUrl(link); //"wv" is the webview and "link" is the url
This is working for me :