material-components/material-components-android

[BottomNavigationView] BottomNavigationView can have only one setOnNavigationItemSelectedListener

Open

#735 aberto em 5 de nov. de 2019

Ver no GitHub
 (3 comments) (8 reactions) (0 assignees)Java (3.023 forks)batch import
Good First IssueWidget: BottomNavigationfeature request

Métricas do repositório

Stars
 (15.910 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador