using highcharts in android

∥☆過路亽.° 提交于 2019-12-14 02:57:38

问题


I m trying to run my html and js code in android studio.but i failed.Can anyon1 tell me what shold i do :

I took an example of html and js from highchart site.I save my html and js file as demo.html in raw folder in res.

My java code is :

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_activitytml);

    WebView wv=(WebView) findViewById(R.id.webview);

    wv.setWebChromeClient(new WebChromeClient());
    wv.setWebViewClient(new WebViewClient());

    wv.getSettings().setDomStorageEnabled(true);

    wv.getSettings().setJavaScriptEnabled(true);
    wv.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    wv.loadUrl("file:///android_res/raw/demo.html");

}

when i run this code...only a blank screen occured..with no outpu and i m using webview in xml file. Plzz can anyone help me. I got the blank screen in emulator.I m able to call the html page but when i make piechart using html and js. then it returns nothing. screen is blank. can anyonehelp me out plzz. Thanks in advance..

来源:https://stackoverflow.com/questions/39324431/using-highcharts-in-android

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