I am using the material design BottomNavigationView component and the fragment transition using Navigation Components.
The issue which I am facing currently is that I cannot able to remove/hide the badges. When we using navigationComponent i cant use setOnNavigationItemSelectedListener instead we use setupWithNavController so when I tap on the itemId how can I know on which fragment/itemId I am currently on and remove the badge for that particular itemId
Create a selector XML to change the icon of the selected menu item. Let's say it's called
bottom_item_selector:Then in your menu XML change the icon to use this drawable:
This way you don't have to add a listener and call
NavigationUIexplicitly.