Reputation: 1508
I've been strugling with setting up proper small icon for notification. For some time I thought its only possible to create white icons to appear on the top bar but by mistake (typing wrong id
of drawable) I've noticed that its possible to also add color image :
But after swipping the top bar down, the second place where icon is visible is all gray (big gray dot):
Is there a way to change that dark grey circle to the proper small_icon ?
My code :
NotificationCompat.Builder b = new NotificationCompat.Builder(context, "default");
b.setAutoCancel(true)
.setDefaults(NotificationCompat.DEFAULT_ALL)
.setWhen(System.currentTimeMillis())
.setSmallIcon(R.drawable.pck_sign)
.setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.drawable.pck_sign))
.setTicker("{Time to watch some cool stuff!}")
.setContentTitle("My Cool App")
.setContentText("Time to watch some cool stuff!")
.setContentInfo("INFO")
.setContentIntent(pendingI);
Upvotes: 0
Views: 532
Reputation: 154
It's happened because the icon size is not the correct, check this documentation:
https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar
Upvotes: 2