susonthapa/curved-bottom-navigation

Can't set colors programmatically

Closed this issue · 4 comments

Hi !
I really appreciate this library. But I found something that, in my case, seems problematic.
I currently have a need to set most colors programmatically in my app, and that the case for a bottomNavBar.

The problem is, using Java (didn't try using Kotlin), though I seems to be able to set the different colors, nothing change when the view is displayed.

bellow is an example of what I tried :

bottomNav.setFabBackgroundColor(colors.getIntPrimaryColor()); bottomNav.setNavBackgroundColor(colors.getIntPrimaryColor()); bottomNav.setSelectedColor(colors.getIntTextOnPrimary()); bottomNav.setUnSelectedColor(colors.getIntTextOnPrimary());

Is there any way to set (or change) the colors programmatically ?
If not would you be interested in implementing this ?

Yeah you are right, I have checked and selectedColor seems to work but other attributes aren't working properly. I haven't updated this library in quite a while. I will manage some time to fix it.

@EleryanYuri I have fixed your problem and some minor issues. The code is currently in this branch. You can help by verifying this.

Well, that was quick! I did not find anything wrong with the fix. Everything is working perfectly fine now.
Thanks for the fix and for your quick response.

This has been fixed in the latest release. Closing the issue.