HTML列表标记在Android TextView中不起作用。这是我的字符串内容:
String str="A dressy take on classic gingham in a soft, textured weave of stripes that resembles twill. Take a closer look at this one.<ul><li>Trim, tailored fit for a bespoke feel</li><li>Medium spread collar, one-button mitered barrel cuffs</li><li>Applied placket with genuine mother-of-pearl buttons</li><li>;Split back yoke, rear side pleats</li><li>Made in the U.S.A. of 100% imported cotton.</li></ul>";
我将其加载到这样的文本视图中:
textview.setText(Html.fromHtml(str));
输出看起来像一个段落。我能做什么?有什么解决办法吗?
编辑:
webview.loadData(str,"text/html","utf-8");
相关分类