2

Hi I have 4 items on bottom navigation bar and I got 'the issue'. I have solved it with the way from this link - How to disable BottomNavigationView shift mode?

Now I wonder how to keep size of icon and title same. My question is that the icon and title get bigger when they are clicked. My code is the same with the link above.

Thanks for your help so much. If more info is needed I will add it.

1 Answer 1

5

I added some code in 'dimens.xml' file, then my icon and text size remains same as before clicked.

before

<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>
</resources>

after

<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>
    <dimen name="design_bottom_navigation_active_text_size">12sp</dimen>
    <dimen name="design_bottom_navigation_active_icon_size">25dp</dimen>
</resources>

Not the answer you're looking for? Browse other questions tagged or ask your own question.