How to pass html string to webview on android

后端 未结 4 1010
无人共我
无人共我 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:24

    To load your data in WebView. Call loadData() method of WebView

    webView.loadData(yourData, "text/html; charset=utf-8", "UTF-8");
    

    You can check this example

    http://developer.android.com/reference/android/webkit/WebView.html

提交回复
热议问题