Java 通知图标图像赢得';t变化(android)
这是我的代码:Java 通知图标图像赢得';t变化(android),java,android,android-notifications,Java,Android,Android Notifications,这是我的代码: Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_test_1); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_tes
Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_test_1);
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_test_1)
.setContentTitle("My notification")
.setContentText("Sssssssssssssssssssss")
.setLargeIcon(largeIcon);
但它不会改变图像,只是作为启动图标,有什么问题吗?1-创建128*128大小的照片 2-将代码替换为以下代码:
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this)
Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), R.drawable.Your photo with a size of 128 x 128);
.setSmallIcon(R.drawable.ic_test_1)
.setContentTitle("My notification")
.setContentText("Sssssssssssssssssssss")
.setLargeIcon(largeIcon);
从大图标创建位图有什么用?你是说我为什么要使用位图吗?因为大图标需要使用位图