Closed ZenHap closed 3 years ago
To fix: bottom_bar.setBadgeAtTabIndex(1, new AnimatedBottomBar.Badge("1", Color.BLACK, Color.WHITE, 9));
AnimatedBottomBar.Badge(badge_value, background_color, text_color, font_size)
you must set the values for the text and badge properties or you'll get an error, no default values
I am reopening this as this definitely needs to be improved for easier use with Java.
something else I noticed is that it can sometimes be extremely unreliable to set, especially with time based or long running functions. I have a function where it retrieves the count of notifications to set the number within the dot to, and when it's in this function it does not work.
I also tried using a webview, and using onPageFinished, it's impossible to change or remove the badge inside onPageFinished
Next version will have new constructors which allows the following:
new AnimatedBottomBar.Badge()
or new AnimatedBottomBar.Badge("1")
Code (Java) bottom_bar.setBadgeAtTabIndex(1, new AnimatedBottomBar.Badge("1"));
Not sure if this is working in kotlin, but so far this means badges can't have text when using java