Android Development: Webview progress Bar
Take a look at: http://groups.google.com/group/android-beginners/msg/61802d28a8335809
ive done that a got it to work but 开发者_如何学Pythonthe progress does not change when clicking on a link in the webbrowser.
So the progressbar is showed when the app starts and load the home URL but when i click a link or search in google the bar is not showed. why?
Thank-you!
webview.setWebViewClient(new WebViewClient() {
ProgressDialog MyDialog;
public void onReceivedError(WebView view, int errorCode,String description,String failingUrl) {
Toast.makeText(activity, "Oh no! " + description,
Toast.LENGTH_SHORT).show();
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
activity.setProgress(progress * 1000);
view.loadUrl(url);
return true;
}
});
精彩评论