Icon gets small in notification

Asked

Viewed 101 times

1

I have a simple notification, but the icon does not fill the whole part. I generated it through Android Asset and put each resolution in its respective folder in mipmap.

Notification Android 4.1

inserir a descrição da imagem aqui

Notification Android 5.0

inserir a descrição da imagem aqui

Notification noti = new Notification.Builder(MainActivity.this).
                setTicker("BPF Denúncia")
                .setContentTitle("BPF Denúncia")
                .setContentText("Há Uma Nova Denúncia Contra Você!")
                .setSmallIcon(R.mipmap.notification)
                .setContentIntent(pIntent).getNotification();

How to resolve to fill the entire Notification space ?

  • You can show an example of how you’d like it to be?

  • I wanted him to fill out the whole thing. If I have a rectangular icon, instead of putting the icon inside another, the icon itself fills everything, without leaving any edge. ,here an example using the same icon:https://s31.postimg.org/n07w0y6l7/image.png

  • Another Example, now he is doing this: https://s31.postimg.org/57goqfu0n/actual.png the right one would be this: https://s31.postimg.org/psvgicblj/novo.png

1 answer

1

You need to set which is the big icon of your notification with setLargeIcon. If you do not set, the small is used in place and does not grow alone.

  • Thank you, I did this and it worked !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.