通知图标不会显示在棒棒糖的状态栏中

时间:2014-12-27 17:24:36

标签: android android-notifications

这是我用来显示通知的代码。

notification = new Notification.Builder(context).setContentIntent(contentIntentTwo)
                        .setContentTitle("App name").setSmallIcon(R.drawable.ic_launcher).setLargeIcon(notificationLargeIconBitmap).getNotification();

通知和通知图标显示在下拉通知抽屉中,但不显示在棒棒糖的状态栏中。

以下是棒棒糖的样子:

enter image description here

这只发生在棒棒糖上。

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:0)

对于pre-lollipop版本,您仍然可以使用drawable图像。但对于棒棒糖和以后,您需要透明背景图像用于通知图标(png首选)。据我所知,棒棒糖版本或更高版本会将任何非透明颜色转换为白色,用于通知图标,因为它的简单性和减少肤色"达到材料设计的想法。

unsigned char buf1[0x16828];  // read 0x16828 bytes from start of file
memcpy(0x8000, buf1, 0x16828);

unsigned char buf2[0x250];  // read 0x250 bytes from offset 0x016840 into the file
memcpy(0x0001f840, buf2, 0x250);

https://medium.com/swarm-nyc/complexion-reduction-a-new-trend-in-mobile-design-cef033a0b978#.fblfw0ohi

相关问题