默认通知的背景颜色颜色、背景、通知

2023-09-04 09:27:16 作者:撩妹高手

我有一个使用的LinearLayout 包含自定义通知的的ImageView 的TextView 。 Android 4.0的在所有我需要做的是换出的文字颜色与 EventContent EventContent.Title 的风格和所有颜色非常漂亮。

I have a custom notification that uses a LinearLayout that contains an ImageView and a TextView. Before Android 4.0 all I needed to do was swap out the text colors with the EventContent and EventContent.Title styles and all the colors looked great.

不过,在Android 4.0(冰淇淋三明治),我自定义通知的背景颜色为浅灰色,而更糟糕的是可怕的冲突与默认的文本样式。这是怪我,因为所有其他通知有一个暗灰色的(几乎是黑色的)颜色,我没有改变的背景颜色都在我的布局。

But on Android 4.0 (Ice Cream Sandwich) my custom notification background color is a light gray, and to make matters worse it clashes horribly with the default text styles. This is strange to me, since all the other notifications have a dark-gray (almost black) color, and I haven't changed the background color at all in my layout.

有没有一种方法来访问默认的背景颜色的通知?我不想手动设置为黑色(或其它颜色),因为我希望它与设备上的主题进展顺利。但我看了看四周,找不到任何东西,让我的颜色。

Is there a way to access the default background color for notifications? I don't want to manually set this to black (or another color) since I want it to go well with the theme on the device. But I've looked around and can't find anything that gives me that color.

推荐答案

这似乎是一个错误的Andr​​oid 4.0.3。见bug报告更新:的http://$c$c.google.com/p/android/issues/detail?id=23863&thanks=23863&ts=1325611036

This appears to be a bug in Android 4.0.3. See bug report for updates: http://code.google.com/p/android/issues/detail?id=23863&thanks=23863&ts=1325611036