how can I wait to show the webView until it loads all the web data? i have created this asynktask sketch:
@Override
protected Void doInBackground(String... params) {
webView.setWebChromeClient(new WebChromeClient());
webView.setWebViewClient(new WebViewClient());
webView.getSettings().setJavaScriptEnabled(true);
String url = params[0];
webView.loadUrl(url);
return null;
}
@Override
protected void onPreExecute() {
//progress = ProgressDialog.show(MainActivity.this,"wait","downloading URL");
progressBar.setVisibility(View.VISIBLE);
}
@Override
protected void onPostExecute(Void result) {
webView.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.GONE);
}
}
it works but a the end of this code, after onPostExecute i'm still seeing the blank page of webview loading