material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[BottomNavigationView] BottomNavigationView can have only one setOnNavigationItemSelectedListener

Open AndrewBloom opened this issue 5 years ago • 3 comments

FEATURE REQUEST

As per title, BottomNavigationView can have only one setOnNavigationItemSelectedListener. This is annoying because if i use the bottomNavigationView.setupWithNavController(navController) this internally sets that listener, and i cannot use it anymore for anything else (like setting the text in a custom appBar, for example) A list of listeners would be the right thing in my opinion.

Ps. this probably applies to setOnNavigationItemReselectedListener(BottomNavigationView.OnNavigationItemReselectedListener listener) too.

For Pattern reference, see NavController addOnDestinationChangedListener and removeOnDestinationChangedListener

AndrewBloom avatar Nov 05 '19 17:11 AndrewBloom

Yes! It will be very useful

kikasik avatar Apr 29 '20 09:04 kikasik

@drchen is this something that is still on the roadmap? I would love to implement this as my first PR if possible

UMFsimke avatar Jun 19 '22 18:06 UMFsimke

@UMFsimke feel free!

imhappi avatar Aug 25 '22 20:08 imhappi