BottomNavigationView with more than 3 Items: tab title is hiding

后端 未结 10 885
-上瘾入骨i
-上瘾入骨i 2020-12-07 16:01

I\'m using BottomNavigationView with using Android Support Desing Library 25. But when I switch the tabs, the other tab\'s title is hiding. But there is no hiding issue actu

10条回答
  •  温柔的废话
    2020-12-07 16:44

    After scan source code of BottomNavigationView I find

    mShiftingMode = mMenu.size() > 3;
    

    in BottomNavigationMenuView.java line 265, it means while menu size more than 3, tab title wiil be hid. So if you want to show tab title you just need to get code from build and change to below.

    mShiftingMode = mMenu.size() > 5;
    

    PS: BottonNavigationView max tab count must between 3 and 5. You can get code on BottomNavigationViewNew

提交回复
热议问题