简体   繁体   中英

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 ?

Example :

  1. I get woth JSoup : <span color="red">Hello</span>
  2. Set <span color="red">Hello</span> in my textview
  3. Output is Hello (in red) in my app
textView.setText(Html.fromHtml("Jsoup Output String Here"));

you can follow this example for jsoup

http://jsoup.org/cookbook/extracting-data/example-list-links

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM