I'm trying to set and remove notifications (without showing any text, just presence/absence of a coloured circle).
Because of design requirements (different size/padding), I'm ignoring everything about notification background color/text color, instead using setNotificationBackground with a circle drawable.
Previously working code (on 2.1.0) was:
bottomNavigation.setNotification(
if (badged) " " else null,
navigationAdapter.getPositionByMenuId(menuItemId)
)
but changing it to
val itemPosition = navigationAdapter.getPositionByMenuId(menuItemId)
if (badged) {
bottomNavigation.setNotification(" ", itemPosition)
} else {
bottomNavigation.setNotification(AHNotification(), itemPosition)
}
shows the same effect on version 2.3.3: while the notification gets animated out, white-colored text null appears on the notification.
Did I misunderstand how to set a notification state of "there is no notification"?
Works as expected on version 2.3.2; what's up with the String.valueOf( in a63ef9b66d ?
I'm trying to set and remove notifications (without showing any text, just presence/absence of a coloured circle).
Because of design requirements (different size/padding), I'm ignoring everything about notification background color/text color, instead using
setNotificationBackground
with a circle drawable.Previously working code (on 2.1.0) was:
but changing it to
shows the same effect on version 2.3.3: while the notification gets animated out, white-colored text
null
appears on the notification.Did I misunderstand how to set a notification state of "there is no notification"?
Works as expected on version 2.3.2; what's up with the
String.valueOf(
in a63ef9b66d ?