material-components/material-components-android

[BottomNavigationView] BottomNavigationView can have only one setOnNavigationItemSelectedListener

開放

#735 建立於 2019年11月5日

 (3 則留言) (8 個反應) (0 位負責人)Java (3,023 個分叉)batch import
Good First IssueWidget: BottomNavigationfeature request

倉庫指標

星標
 (15,910 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南