默认通知背景颜色 [英] Default notification background color

查看:20
本文介绍了默认通知背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义通知,它使用包含 ImageViewTextViewLinearLayout.在 Android 4.0 之前,我需要做的就是用 EventContentEventContent.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.

推荐答案

这似乎是 Android 4.0.3 中的一个错误.请参阅错误报告以获取更新:http:///code.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

这篇关于默认通知背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆