Android notification text span color not working in dark mode

Viewed 232
 SpannableString aaaa = new SpannableString("AAAA");
 ForegroundColorSpan colorSpan = new ForegroundColorSpan(ContextCompat.getColor(context, android.R.color.holo_blue_bright));
 aaaa.setSpan(colorSpan, 0, 4, 0);

new NotificationCompat.Builder(context, CHANNEL_ID)
.setContentTitle(aaaa)
.build();

It works fine for a light theme but in dark mode, all colors are fade away. I know about custom views, but is there any ability to do it without a custom view?

0 Answers
Related