Android BigPictureStyle 推送通知中的 image/bitmap 大小应该是多少?
What should be the image/bitmap size in Android BigPictureStyle push notification?
我想在通知中清楚地了解 BigPictureStyle 位图的图像大小。
我看过一些教程,但找不到关于此位图的尺寸规格。
一些要求具有 2:1 纵横比。
我想弄清楚
中 bitmap/image 的推荐尺寸
NotificationCompat.BigPictureStyle s = new NotificationCompat.BigPictureStyle().bigPicture(bitmap_image);
s.setSummaryText("Summary text appears on expanding the notification");
notificationBuilder.setStyle(s);
请指导我完成这个。
您可以找到提到这一点的 Google I/O 幻灯片演示 here(Chet Haase、Romain Guy 和 Dan Sandler 的演示)。
特别是在第 52 张幻灯片上,它说明了 BigPictureStyle:
Protips
Images should be ≤ 450dp wide, ~2:1 aspect
Bitmaps outside these bounds will just be wasting
RAM (and possibly exceeding Binder IPC limits)
请注意,此演示文稿已有数年历史,但没有理由偏离其建议。
它应该是具有透明背景的 .png 图像。* 710*90* 它是我正在使用的图像尺寸并且效果很好。 :)
我想在通知中清楚地了解 BigPictureStyle 位图的图像大小。
我看过一些教程,但找不到关于此位图的尺寸规格。
一些要求具有 2:1 纵横比。
我想弄清楚
中 bitmap/image 的推荐尺寸 NotificationCompat.BigPictureStyle s = new NotificationCompat.BigPictureStyle().bigPicture(bitmap_image);
s.setSummaryText("Summary text appears on expanding the notification");
notificationBuilder.setStyle(s);
请指导我完成这个。
您可以找到提到这一点的 Google I/O 幻灯片演示 here(Chet Haase、Romain Guy 和 Dan Sandler 的演示)。
特别是在第 52 张幻灯片上,它说明了 BigPictureStyle:
Protips
Images should be ≤ 450dp wide, ~2:1 aspect Bitmaps outside these bounds will just be wasting RAM (and possibly exceeding Binder IPC limits)
请注意,此演示文稿已有数年历史,但没有理由偏离其建议。
它应该是具有透明背景的 .png 图像。* 710*90* 它是我正在使用的图像尺寸并且效果很好。 :)