I'm trying to implement night mode for my app.
In my whole app, ?android:attr/textColorPrimary is white in night mode and black in day mode. Just in my notifications it's always black. In the Android Studio layout preview the text is white. (I'm sending the notifications from a foreground service if that's relevant.)
I could make a night mode layout file for the notifications where I use @color/white for the text but why doesn't it work with attributes?
I've found the reason. I had to set the notification layout's theme to Theme.MaterialComponents.DayNight.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With