Q:

WebView - show dialog when user clicks a link

I have an activity with a WebView. When the activity loads, I show an alert message which I dismiss on "onPageFinished" event.
What I need to do know, is show a ProgressBar when the user clicked on a link and the webview is loading it, and dismiss it when the loading is over. Similar to iPhone behaviour.
Is it possible?
10X :)
Udi

A:

This is described in the documentation:
 final Activity activity = this;
 webview.setWebChromeClient(new WebChromeClient() {
   public void onProgressChanged(WebView view, int progress) {
     // Activities and WebViews measure progress with different scales.
     // The progress meter will automatically disappear when we reach 100%
     activity.setProgress(progress * 1000);
   }
 });

See also here.

