微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > 手机插上USB连上PC,下拉通知栏中通知的图标和背景颜色与其他通知不同

手机插上USB连上PC,下拉通知栏中通知的图标和背景颜色与其他通知不同

时间:10-02 整理:3721RD 点击:
手机插上USB连上PC,下拉通知栏中"USB Connected"通知的图标和背景颜色与其他通知不同
1.这是google default design.
2.在notification.java中,会判断当前notification的优先级,如果优先级小于PRIORITY_LOW,则
为其单独设置颜色和背景图片,如下:
if (mPriority < PRIORITY_LOW) {
contentView.setInt(R.id.icon,
"setBackgroundResource", R.drawable.notification_template_icon_low_bg);
contentView.setInt(R.id.status_bar_latest_event_content,
"setBackgroundResource", R.drawable.notification_bg_low);
}
3. 如果优先级不小于PRIORITY_LOW,则通知的使用的resource分别是
R.drawable.notification_template_icon_bg和R.drawable.Notification_bg.

学习了,目前我们在5.1碰到了同样的问题

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top