【发布时间】:2015-08-09 22:56:41
【问题描述】:
关于 android InboxStyle() 的快速问题,我可以有一个彩色字符串吗?我尝试使用Spannable 喜欢
NotificationCompat.InboxStyle style = new NotificationCompat.InboxStyle();
text = "sample";
Spannable spannable = new SpannableString(text);
spannable.setSpan(new ForegroundColorSpan(Color.GREEN), 0, text.length(), 0);
style.addLine(spannable);
但没有运气... :(
我可以添加颜色吗?谢谢!
【问题讨论】:
标签: android string colors notifications spannable