I thought it was a single line but it does not activate me:
Here is the code:
WebView myWeb;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myWeb = (WebView) findViewById(R.id.wb);
myWeb.getSettings().setJavaScriptEnabled(true);
myWeb.setWebViewClient(new WebViewClient());
myWeb.loadUrl("http://mi.pagina.com");
}
As you can see, the line that I thought was only shown is:
myWeb.getSettings().setJavaScriptEnabled(true);
Clarification: The effects of materialize are perfect for me, what does NOT work for me is the ads in the javascript window, for example, when I want to delete a user, a message appears on the website asking if I am sure to delete or not, and if I accept accept it eliminates it, because that is what does not appear in my WEBVIEW.
Any ideas?
Now I am trying with this code that in theory I should walk but I close the application "has stopped":
WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
webView = (WebView) findViewById(R.id.wb);
webView.setWebChromeClient(new WebChromeClient());
webView.setWebViewClient(new WebViewClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://mi.pagina.com");
}