Selected tab's color in Bottom Navigation View

前端 未结 10 1999
故里飘歌
故里飘歌 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条回答
  •  猫巷女王i
    2020-11-28 04:05

    It's too late to answer but might be helpful for someone. I was doing a very silly mistake, I was using a selector file named as bottom_color_nav.xml for Select and unselect color change but still it was not reflecting any color change in BottomNavigationView.

    Then I realize, I was returning false in onNavigationItemSelected method. It will work fine if you'll return true in this method.

提交回复
热议问题