aurelhubert / ahbottomnavigation

A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.
3.84k stars 682 forks source link

Calling setColoredModeColors() inside onTabSelectedListener() breaks ripple #411

Open d-goods opened 5 years ago

d-goods commented 5 years ago

Calling bottomNavigation.setColoredModeColors() (or pretty much any other method from the AHBottomNavigation class) inside the onTabSelectedListener() sets the center of the color change ripple to the top left corner of the bottom navigation element. I'm suspecting that it has something to do with the createItems() method called at the end of all offending methods in AHBottomNavigation.class. Is there a way to set the color change ripple center after these methods are called so the ripple comes from the center of the icon? Thanks.