Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好奇地想知道Spannable在android中的目的是什么。char 数组还不够吗?
Spannable
ASpannable允许将粗体、斜体、...等格式信息附加到字符的子序列(“跨度”,即名称)上。只要您想表示“富文本”,就可以使用它。
该类Html提供了一种构造此类文本的简单方法,例如:
Html
Html.fromHtml("Text with <b>bold</b> and <em>italic</em>.")