BottomNavigationView with more than 3 Items: tab title is hiding

后端 未结 10 902
-上瘾入骨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:41

    You can use this for showing both text and icons on BottomNevigationView for 3 to 5 items and stop shifting.

     app:labelVisibilityMode="labeled"
    

    But you will will face a problem of long text cutting on BottmNevigationView for 5 items. for that ,I found a good solutions for stop shifting of text as well as icons of BottomNevigationView. You can also stop shifting of text as well as Icons on BottomNevigationView also. Snipshots of code is given here.

    1. Add this some line of code in BottomNevigationView as shown

    
    

    2. Add Menu Items like as follows:-

     
    
    
        
    
        
    
        
    
        
    
        
    
    
    

    3.Add this style in style.xml file:

     
    

    4)Add these in Dimen folder

    
    
        10sp
        10sp
    
    

    I got help from these link and link .You can also get get help by studying these links.This helps me a lot.Hope this also help you. Thanks....

提交回复
热议问题