我的应用程序中的通知栏仅显示自动收报机中的小图标(应该如此).但是,当“阴影”被拉下时,它会显示自动收报机中的小图标,以及我在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;

}

}

我不太清楚为什么会这样.任何帮助?

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐