I've got a very basic WebView
which works until I try to add a custom webViewClient
where it stops processing JavaScript. Am I doing something wrong? Is there another way to get rid of the address bar and menu options in the WebView?
browser = (WebView) findViewById(R.id.webkit);
WebSettings webSettings = browser.getSettings();
webSettings.setJavaScriptEnabled(true);
// uncommenting this line will remove address bar, but also stop JavaScript from loading
//browser.setWebViewClient(new InternalWebViewClient());
// even uncommenting this line will stop JavaScript from loading
//browser.setWebViewClient(new WebViewClient());
browser.setWebChromeClient(new InternalWebChromeClient());
if (savedInstanceState != null) {
browser.restoreState(savedInstanceState);
} else {
browser.loadUrl("http://site.with.javascript");
}