我怎样才能显示特殊字符(如&安培; ndash的;)在TextView中?安培、特殊字符、TextView、ndash

2023-09-05 01:52:49 作者:淡墨

我怎么能显示特殊字符(如&放大器; ndash的;&安培; QUOT; )?在一个TextView

How can I display special characters(like – ") in a TextView?

推荐答案

您可以使用 Html.fromHtml()来处理HTML格式的文本到 Spannable 的TextView 可以显示。

You can use the Html.fromHtml() to handle HTML formatted text into a Spannable that TextView can display.