I\'ve created a small app that has three fragments for top-level navigation through a BottomNavigationView. If you launch the app and click on a navigation button on the bottom
You could set the navigation icon to null, or change the icon only for some destinations eg:
1) In Kotlin:
navController.addOnDestinationChangedListener { _, destination, _ ->
toolbar.title = destination.label
toolbar.navigationIcon = null
}
2) In Java:
hostFragment.getNavController().addOnDestinationChangedListener(new OnDestinationChangedListener() {
public final void onDestinationChanged(@NotNull NavController controller, @NotNull NavDestination destination, @Nullable Bundle arguments) {
toolbar.setTitle(destination.getLabel());
toolbar.setNavigationIcon(null);
}
});