【发布时间】:2017-02-21 16:03:36
【问题描述】:
// 3. 创建并发送通知 通知通知 = new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle("Geofence Monitor")
.setContentText(text)
.setContentIntent(pendingNotificationIntent)
.setStyle(new NotificationCompat.BigTextStyle().bigText(bigText))
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setAutoCancel(true)
.build();
notificationManager.notify(0, notification);
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
new NotificationCompat.Builder(this).setSmallIcon(R.mipmap.ic_launcher);
} else {
new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher);
}
}
}
我的问题是,当我运行应用程序时,设备上的应用程序支持 mipmap 启动器,但在 lolipop 及以上设备中不显示白色,我想在 lolipop 及以上设备中显示相同的 mipmap 启动器。 提前感谢和帮助!
【问题讨论】: