aurelhubert / ahbottomnavigation

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

No public methods to change the predefined margins for icons. #355

Open cwliu opened 6 years ago

cwliu commented 6 years ago

About font size, there is a discussion from https://github.com/aurelhubert/ahbottomnavigation/issues/64

For now, no. The library was created to follow the guidelines (and so the text sizes) of Material Design. It could be a bit complicated to manage text sizes because there is a small increase of the text size for the selected item (so if we add a method to set the text size, we should think about the difference between selected/unselected item).

However, I checked the latest guideline: https://material.io/design/components/bottom-navigation.html#theming. I think the font size should be 12 sp no matter the status is active or inactive, shouldn't it?

I knew there is a method to set text size by bottomNavigation.setTitleTextSize(), but there is no public method to change bottom_navigation_margin_top_active and bottom_navigation_margin_top_inactive defined in dimens.xml. That caused a problem the icons moved when switching between active and inactive. I hope it can be fixed in the same position between states.