I got the code for showing activity indicator in a webview. I checked more than one reference and still I couldn\'t get it working. Can you please help me to debug my code b
Write below code in Activity's onCreate method.
webView.setWebChromeClient(new ChromeClient());
progress=ProgressDialog.show(this, "", "Loading...");
webView.loadUrl(url);
Create ChromeClient class in same activity.
private class ChromeClient extends WebChromeClient {
@Override
public void onProgressChanged(WebView view, int newProgress) {
if(newProgress >= 85) {
progress.dismiss();
}
super.onProgressChanged(view, newProgress);
}
}
Declare objects accordingly. Get back to me If you still face error. I will provide full source code.