Dynamically setting links to text in strings.xml

后端 未结 4 1939
野趣味
野趣味 2020-12-15 11:12

I\'m trying to make an app with localisation built in, but I want a way that I can create a web link within the text, the URL being defined elsewhere (for ease of maintenanc

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-15 11:26

    Try using Html.fromHtml() to convert the HTML into a Spannable that you put into the TextView. With what you have in #1, I would expect the TextView to show the HTML source, not rendered HTML.

提交回复
热议问题