material-components-android
material-components-android copied to clipboard
[BadgeDrawable] Allow string in addition to int
Is your feature request related to a problem? Please describe. BadgeDrawable can show a number on badge very easily. This capability can be extended for strings. This will be useful for some strings like "New" or "!".
Describe the solution you'd like Something like BadgeDrawable.setText().
Any news on this feature request yet? Would love for this to be implemented as all workarounds using custom layouts are currently quite a pain.
Sorry, we are still waiting for design to conduct usability studies and provide guidance.
This is a year old now, and we are having same need.
I would like to see this implemented as well. Would like to support displaying 99+ for values > 99
@alankley please try setting mtrl_badge_max_character_count
to be 3, the default == 4
Why is this so hard to approve and implement? How complicated can it be? We all need to add custom badge just because we need to set int instead of String. I also need to set 99+ if there are more than 99 notifications and in order to do that I need to add some workarounds that are not always good.
@wcshi is there any news about this?
Thanks in advance...
I also need to set 99+ if there are more than 99 notifications this is currently supported, set
maxCharacterCount
to 3 instead of 4 (default) and when there are more than 99 notifications the badge text will display "99+" instead.
Thanks @wcshi, I somehow missed that comment. Thanks for the help again, you saved me a bunch of time.
save my day! On 8 Aug 22,we are still waiting for the feedback.