When you select an item in the Bottom Navigation Bar provided by Android Studio it displays a fragment. I want to make a logout item that when you select it, it calls a method but don't actually bring me a fragment.
I understand that NavigationUI set up all the configuration of the navigation bar, so when I try to implement navController.addOnDestinationChangedListener() and add my action to my logout item, I think that overrides the nav configuration and I just can't navigate over the items
Does I have to configure by myself and add a listener on every item?
I also want to make that when a confirmation dialog appears when you clicked the logout item, if u select cancel it returns you to the previous state (EX: I'm in Home fragment, if I click on logout item, and I cancel it, it returns me to the Home fragment)