作者:爱死猪猪侠110_338 | 来源:互联网 | 2023-05-18 04:46
IhaveaTextViewandIwanttoshowmulti-coloredtextinthat.Iamusinghtml.fromHtmlforthis,
I have a TextView
and I want to show multi-colored text in that. I am using html.fromHtml
for this, but it is not showing any color.
我有一个TextView,我想显示多色文本。我正在为此使用html.fromHtml,但它没有显示任何颜色。
My code is:
我的代码是:
//statusToShow is a String
Log.d("html ==>", statusToShow) ;
RStatus.setText(Html.fromHtml(statusToShow),
TextView.BufferType.SPANNABLE);
Value from Log is:
从日志值:
C P E D
mso - fareast - font - family:宋体;mso - bidi - font - family: " times new roman "; mso - bidi - theme - font
2 个解决方案