最佳答案
Android 提供了各种与文本和字符串相关的界面:
Spanned
,SpannedString
,Spannable
,SpannableString
和 CharSequence
。
在使用 Html.fromHtml()
显示 TextView
内部的可链接文本以便应用一些样式之后,我已经在各种场景 通常中使用了上述所有内容。
I have tried to understand the purpose/usage of these interfaces from Android's official documentation and have failed as it is quite confusing.. 这些接口的目的是什么?在哪些情况下使用它们是最常见的?在什么情况下最好避免使用它们?当使用其中任何一个时,是否有任何明显的性能影响需要考虑?
如果有人能提供一个体面的解释,我们将不胜感激。