WAI
Status Update
Comments
il...@google.com <il...@google.com> #2
NavigationUI follows the material design guidelines, which specifically call for a cross fade animation between BottomNavigationView items (and, as we've confirmed with the material team, also is the case for DrawerLayout, etc): https://material.io/design/components/bottom-navigation.html#behavior
Setting your own listener is indeed the correct approach if you want to deviate from the guidelines and what NavigationUI provides.
Setting your own listener is indeed the correct approach if you want to deviate from the guidelines and what NavigationUI provides.
Description
Version used: 2.1.0-beta02
Devices/Android versions reproduced on: All Devices
It would be great to support sending a NavOptions Object along with:
- NavigationUI.setupWithNavController() so that we could apply Custom Transition Animation when using BottomNavigationView or DrawerLayout
- NavigationUI.onNavDestinationSelected() so that we could apply Custom Transition Animation when using OptionsMenu
Or At Least, Allow creating Custom NavigationUI by extending NavigationUI Class.
To Overcome the Above Issue, I have to override BottomNavigationView.setNavigationItemSelectedListener() then using navController.navigate(item.getItemId(), null, navOptions);
I have discuss this in a Github project here