三星Android 7中未显示通知图标

问题描述 投票:0回答:1

我正在尝试为我的应用显示通知图标。对于所有操作系统版本和设备,除了配备Android 7的三星设备外,它的工作正常。

enter image description here

状态栏中的通知图标。 enter image description here

这是我正在显示的实际通知图标。 enter image description here

图标在中间是完全白色和透明的,因此在这里不可见。

这是我用来显示图标的代码。

Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder =
                new NotificationCompat.Builder(getApplicationContext())
                        .setSmallIcon(R.drawable.ic_comment)
                        .setContentTitle(messageMap.get(MESSAGE_KEY_NOTIFICATION))
                        .setSubText(getTitle(eventType))
                        .setAutoCancel(true)
                        .setColor(getResources().getColor(R.color.primary_blue))
                        .setSound(defaultSoundUri)
                        .setContentIntent(getPendingIntent(eventType))
                        .setGroup(GROUP_ID_TEAM_INVITATION);
notifications material-design samsung-mobile android-7.0-nougat
1个回答
0
投票

这是导致问题的图标。图标的大小不合适。

© www.soinside.com 2019 - 2024. All rights reserved.