[英]JSoup : How to get an html element, and set the content in a Textview
Using Jsoup, is it possible to get an html element, and set the content in a Textview and keeping html tag formated ? 使用Jsoup,是否可以获取html元素,并在Textview中设置内容并保持html标签的格式?
Example : 范例:
<span color="red">Hello</span>
我很高兴JSoup: <span color="red">Hello</span>
<span color="red">Hello</span>
in my textview 在我的文本视图中设置<span color="red">Hello</span>
textView.setText(Html.fromHtml("Jsoup Output String Here"));
you can follow this example for jsoup 您可以按照以下示例进行jsoup
http://jsoup.org/cookbook/extracting-data/example-list-links http://jsoup.org/cookbook/extracting-data/example-list-links
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.