aurelhubert / ahbottomnavigation

A library to reproduce the behavior of the Bottom Navigation guidelines from Material Design.
3.83k stars 682 forks source link

Hide notification when tab is selected #352

Open kryanod opened 6 years ago

kryanod commented 6 years ago

I want the notification to disappear when I select the corresponding tab, and I want it to reappear once I select another tab. How can I achieve that? I would expect having something like bottomNavigation.setShowActiveTabNotification(false)

Haziim7 commented 6 years ago

You can use bottomNavigation.setNotification(new AHNotification(), index) to remove notification

ToBoehmK commented 5 years ago

Why does calling #removeAllItems() not remove all notifications too? The above solution looks like a hack (that worked though - have applied it myself).