What do I need to my code to make the dialog dismiss()
after the webview is loaded?
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
CookieSyncManager.createInstance(this);
CookieSyncManager.getInstance().startSync();
webview = (WebView) findViewById(R.id.webview);
webview.setWebViewClient(new homeClient());
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setPluginsEnabled(true);
webview.loadUrl("http://google.com");
ProgressDialog pd = ProgressDialog.show(Home.this, "",
"Loading. Please wait...", true);
}
I've tried
public void onPageFinshed(WebView view, String url){
pd.dismiss();
}
Didn't work.