How to set underline text on textview?

后端 未结 12 1176
慢半拍i
慢半拍i 2020-12-23 17:42

How to set underline text on textview?

I have used following code but it is not working.

tvHide.setText(Html.fromHtml("

12条回答
  •  春和景丽
    2020-12-23 18:04

    you're almost there: just don't call toString() on Html.fromHtml() and you get a Spanned Object which will do the job ;)

    tvHide.setText(Html.fromHtml("

    Hide post

    "));

提交回复
热议问题