Android: Parsing HTML tags in JSON

前端 未结 2 550
半阙折子戏
半阙折子戏 2021-01-15 18:05

can anybody help me parsing HTML tags in JSON? I got tags like ,

, etc. on the values of my JSON file. And I want to be able to parse them, so

相关标签:
2条回答
  • 2021-01-15 18:28

    Have a look at android.text.Html.

    You can use this to do something like:

    textView.setText(Html.fromHtml("Hello, <b>I am bold</b>"));
    
    0 讨论(0)
  • 2021-01-15 18:40

    android.text.Html could be your friend here.

    static Spanned Html.fromHtml(
        String source,
        Html.ImageGetter imageGetter,
        Html.TagHandler tagHandler )
    

    http://developer.android.com/reference/android/text/Html.html

    0 讨论(0)
提交回复
热议问题