`

webview 乱码解决

阅读更多

项目中使用以下提取带有中文的html,出现了乱码
holder.webView.loadData(html, “text/html”, “utf-8″);
经过多次尝试发现用
holder.webView.loadDataWithBaseURL (null, html, “text/html”, “utf-8″,null);
这个方法却能很好解决乱码问题,遇到这个问题的朋友不妨一时。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics