"@android: style / TextAppearance.StatusBar.EventContent.Title" sets the color to white instead of gray in android L

Android L uses a white background for notifications and a gray color for text on it. But "@android:style/TextAppearance.StatusBar.EventContent.Title" still sets the TextView color to the same white color as KitKat or previous versions. It should return the gray color used in the new Android L notification style.
How can i solve this? Thanks in advance.

+7
android android-5.0-lollipop android-notifications
source share
3 answers

Android-L doesn't seem to override "@android:style/TextAppearance.StatusBar.EventContent.Title" , instead introduces a new style

 <style name="TextAppearance.Material.Notification.Title"> <item name="textColor">@color/primary_text_default_material_light</item> <item name="textSize">@dimen/notification_title_text_size</item> </style> 
+7
source share

We could use both API-based value folders and properly handle them.

/values/styles.xml

 <style name="NotificationTitle" parent="@style/TextAppearance.StatusBar.EventContent.Title" /> 

/values-21/styles.xml

 <style name="NotificationTitle" parent="@android:style/TextAppearance.Material.Notification.Title" /> 

Now call the next line in TextView

 android:textAppearance="@style/NotificationTitle" 
+1
source share

Here is what helped me solve this error. In your styles.xml add the following:

  <style name="TextAppearance"> </style> <style name="TextAppearance.StatusBar"> </style> <style name="TextAppearance.StatusBar.EventContent"> <item name="android:textColor">#ff6b6b6b</item> </style> <style name="TextAppearance.StatusBar.EventContent.Info"> <item name="android:textColor">#ff6b6b6b</item> </style> 
0
source share

All Articles