android button text and html

前端 未结 3 756
轻奢々
轻奢々 2020-12-19 06:38

how do I use html in an android widget Button?

3条回答
  •  北海茫月
    2020-12-19 07:04

    You should be able to use Html.fromHtml() to convert raw HTML into a Spanned object that you can use in a setText() call on your button. As the Html documentation states, "Not all HTML tags are supported".

提交回复
热议问题