I refer this. Schedules Activity is appeared when I click Schedules, but first item color (Favorites) is always selected. It doesn\'t change Schedules item color from Favorites
In my situation, I used BottomNavigationBarEx plugin. So, I had to do it like below:
In my res/layout/layout_navigation_view.xml:
Added app:itemIconTint="@drawable/bottom_nav_colors"
. Since, I only used icons. So if you have text add this: app:itemTextColor="@drawable/bottom_nav_colors"
also.
Then in res/drawable directory (because selector
s need to include in drawable
or animatable
directory) add the selector
(as others mentioned):
Then in res/values/colors.xml add your select and unselect colors, as ex:
#bfbfbf
#3F51B5