roughike / BottomBar

(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.
Apache License 2.0
8.43k stars 1.51k forks source link

Badge not resizing when setting new value #853

Open dsuresh-ap opened 6 years ago

dsuresh-ap commented 6 years ago

Tested on version 2.3.1

Calling setBadgeCount() doesn't resize the badge icon when going to a larger number. Ex. 99 ->101. The "10" gets cut off. Looking at the view debugger it shows the badge TextView as the same size before and after setting the badge count.

The only solution I found around this is to remove the badge first and then set it if the number is going to be large.

elly0t commented 6 years ago

same here

dsuresh-ap commented 6 years ago

@elly0t I managed to temporarily fix the issue by checking if the new number's digit count goes over or under 100. It if does, then I remove the badge and add it instead of just setting the number.