How can I show the progress bar while loading data into my webview? My code :
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInsta
Before calling loadData() function, just try to show ProgressDialog or put ProgressBar inside layout.
And inside the WebViewClient, just dismiss() the progressDialog or make the ProgressBar invisible.
for example:
// when finish loading page
public void onPageFinished(WebView view, String url) {
if(mProgress.isShowing()) {
mProgress.dismiss();
}
}
FYI, call loadData() or loadURL() only after you are done with web client setting.
check this example: Load WebView with ProgressDialog