What do I need to my code to make the dialog dismiss() after the webview is loaded?
public void onCreate(Bundle savedInstanceState) {
wv1.setWebViewClient(new WebViewClient() {
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Toast.makeText(Entertainment.this, description, Toast.LENGTH_SHORT).show();
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon)
{
progressDialog.show();
}
@Override
public void onPageFinished(WebView view, String url) {
progressDialog.dismiss();
String webUrl = wv1.getUrl();
}
});
wv1.loadUrl(url);
The above code will show a progress dialogue for every incoming link you navigate to the in webview.