0

so I only need to know when the user clicks on a certain menu item in my bottom navigation bar, the thing is that navigation works correctly if I put a navController.navigate() inside of this listener, but I don't want to do it because it messes with my cache state strategy, what I only want is to keep the bottom nav runing as always and navigating without any issues.

Only thing that I need to do is to register when the user clicks on that menu item, and I'm doing that with this

if(bottomNavigationBar.menu.getItem(3).isVisible) {
            bottomNavigationBar.menu.getItem(3).setOnMenuItemClickListener {
                trackEvent()
                true
            }
        }

thing is that with this code it tracks when I click the menu item but it does not navigate to the destination

any one knows why I need to add navController.navigate() to this click event to navigate ? I don't want to do so

SNM
  • 5,625
  • 9
  • 28
  • 77

0 Answers0