How to pass html string to webview on android

后端 未结 4 1022
无人共我
无人共我 2020-11-30 19:13

Hi I am parsing xml and then loading it to web view, after parsing I am creating four strings so that I could append all string to one view. I am able to get two views on th

4条回答
  •  臣服心动
    2020-11-30 19:37

    Passing null would be better. The full codes is like:

    WebView wv = (WebView)this.findViewById(R.id.myWebView);
    wv.getSettings().setJavaScriptEnabled(true);
    wv.loadDataWithBaseURL(null, "...", "text/html", "utf-8", null);
    

提交回复
热议问题