Selected tab's color in Bottom Navigation View

前端 未结 10 2000
故里飘歌
故里飘歌 2020-11-28 03:47

I\'m adding a BottomNavigationView to a project, and I would like to have a different text (and icon tint) color for the selected tab (to achieve greying out no

10条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 04:08

    In order to set textColor, BottomNavigationView has two style properties you can set directly from the xml:

    • itemTextAppearanceActive
    • itemTextAppearanceInactive

    In your layout.xml file:

    
      
    

    In your styles.xml file:

        
        
        
    

提交回复
热议问题