Android Notification setSmallIcon with level sheet

I use Notification.Builder to create a notification. For this notification, I use the list of levels as a small icon

mNotificationBuilder.setSmallIcon(R.drawable.icon_levellist, levelInt); 

This sets the icon to the correct level in the status bar, however when the notification is turned off, the icon is set to the default level.

I tried using a custom layout to display it and it works, however I would like to be able to use the default layout that comes with Notification.Builder.

This is mistake?

+4
source share
1 answer

I think this is a mistake, because I am experiencing the same thing. You can ask this problem: http://code.google.com/p/android/issues/detail?id=43179&q=setSmallIcon&colspec=ID%20Type%20Status%20Owner % 20Summary% 20Stars

+4
source

Source: https://habr.com/ru/post/1412154/


All Articles