I've a bottom navigation with 4 menu items.
If the user is in the home navigation fragment and he clicks on the home navigation item again, the fragment is getting recreated.
How do I disable the click for the current navigation menu item?
Here's my code for the navigation:
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(R.id.navigation_home, R.id.navigation_feed, R.id.navigation_profile, R.id.trips_feed).build();
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(navView, navController);