格式文本框在Android中 [英] Rich Text Box in android
问题描述
有没有在android的任何控制,我们可以作为一个丰富的文本框,它可以处理的字符,如粗体,斜体等格式,并使用字体和颜色使用?
Is there any control in android which we can use as a rich text box which can handle formatting of characters such as bold, italic etc. and use fonts and color ?
如果任何人有相关的上述信息的任何链接或来源,请与我分享。
If anyone having any link or source related to the above information please share it with me.
推荐答案
SpannableString
类或 HTML.fromHtml()
允许您在实际字符串处理不同的风格。请参阅下面的链接:
SpannableString
class or HTML.fromHtml()
allows you to manipulate different styles in actual string. See the links below:
<一个href="http://developer.android.com/reference/android/text/SpannableString.html">http://developer.android.com/reference/android/text/SpannableString.html http://developer.android.com/reference/android/text/Html.html#toHtml(android.text.Spanned)
http://developer.android.com/reference/android/text/SpannableString.html http://developer.android.com/reference/android/text/Html.html#toHtml(android.text.Spanned)
这篇关于格式文本框在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!