我的应用程序中的通知栏仅显示代码中的小图标(应该如此)。但是,当“阴影”被拉下时,它会同时显示代码中的小图标,以及我在 Notification.Builder 中设置的大图标。这是我的代码:
if (Build.VERSION.SDK_INT > 10){
notification = new Notification(R.drawable.ic_stat_mintchip,
"This is a test",
System.currentTimeMillis());
notification.largeIcon = (((BitmapDrawable)c.getResources().getDrawable(R.drawable.ic_launcher)).getBitmap());
notification.defaults |= Notification.DEFAULT_ALL;
notification.number += 1;
notification.flags |= Notification.FLAG_AUTO_CANCEL;
} else {
notification = new Notification(R.drawable.ic_stat_mintchip,
"This is a test",
System.currentTimeMillis());
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notification.defaults |= Notification.DEFAULT_ALL;
notification.number += 1;
}
}
我不太清楚为什么会这样。有什么帮助吗?