JavaScript doesn't work on ICS

♀尐吖头ヾ 提交于 2019-12-01 11:23:29

the only solution I found is the same as the question....

Might be a stupid thing i'm saying here. But it's late and i'm tired ...

Have you tried enabling Javascript in the WebView?

WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);

u can add one property android:hardwareAccelerated="true" in application tag of your manifest.xml as well u can add some settings in on create

wvMain.getSettings().setSupportZoom(true);
      wvMain.getSettings().setBuiltInZoomControls(true);
      wvMain.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
      wvMain.setScrollbarFadingEnabled(true);
      wvMain.getSettings().setLoadsImagesAutomatically(true);
      wvMain.getSettings().setJavaScriptEnabled(true);
      wvMain.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
       wvMain.getSettings().setPluginsEnabled(true);
         wvMain.getSettings().setSupportZoom(false);     

         wvMain.getSettings().setCacheMode(wvMain.getSettings().LOAD_NO_CACHE);
         webSettings8.setPluginState(WebSettings.PluginState.ON);
         wvMain.setWebViewClient(new WebViewClient());
         wvMain.addJavascriptInterface(this, "Android");
         wvMain.getSettings().setSupportMultipleWindows(true);
         wvMain.getSettings().setPluginsEnabled(true);
         wvMain.getSettings().setUseWideViewPort(true);
         wvMain.getSettings().setLoadWithOverviewMode(true);

i hope this helps.but note, hardwareaccelerated property supports after 3.0.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!