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

贡献者指南