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
Using a custom
NavigationItemSelectedListener
you are removing the original listener. However you can trigger the default behavior usingNavigationUI.onNavDestinationSelected(it, navController)
.