Prepare your progress bar
like
progressBar.setProgress(0);
probressbar.setMax(100);
You should set intermediate progress
by using
progressBar.setProgress(int);
and implement your WebViewClient
like this:
web.setWebViewClient(new myWebClient());
//add this below line
web.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress) {
progressBar.setProgress(progress);
if (progresss == 100) {
progressBar.setVisibility(View.GONE);
} else{
progressBar.setVisibility(View.VISIBLE);
}
}
});