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);
Run Code Online (Sandbox Code Playgroud)
但没有运气... :(
我可以添加颜色吗?谢谢!