ProgressDialog not getting dismissed in webChromeClient in WebView
<p>I am having below code
but Progress Dialog never gets dismissed even after progress is 100 percent.</p>

<pre><code>    try{

    webView = (WebView) findViewById(R.id.browserwebview);
    webView.getSettings().setJavaScriptEnabled(true);





     webView.setWebChromeClient(new WebChromeClient() {
            public void onProgressChanged(WebView view, int progress)
            {
                catalogProgressDialog = new ProgressDialog(activity);
                catalogProgressDialog.setCancelable(true);


                catalogProgressDialog.show();
                catalogProgressDialog.setProgress(0);
                activity.setProgress(progress * 1000);

                catalogProgressDialog.incrementProgressBy(progress);

                if(progress == 100 &amp;&amp; catalogProgressDialog.isShowing()){
                     catalogProgressDialog.dismiss();                       

                }


            }
        });

        webView.setWebViewClient(new WebViewClient() {
            @Override
            public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
            {
                Toast.makeText(activity, "Oh no!"+ description, Toast.LENGTH_SHORT).show();

            }
            @Override
            public void onPageFinished(WebView view, String url) {
               view.scrollBy(0, view.getContentHeight());


            }


            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url)
            {
                view.loadUrl(url);
                return true;
            }
        });




        webView.loadUrl("http://www.google.com");
        webView.pageDown(true);
        webView.setHorizontalScrollBarEnabled(true);
        webView.setVerticalScrollBarEnabled(true);

}
catch (Exception e) {
    e.printStackTrace();
}
</code></pre>

<p>It doesn't even show progress completed.
thanks. </p>
