oneHamidreza / MeowBottomNavigation

Android Meow Bottm Navigation
http://etebarian.com
1.34k stars 200 forks source link

Remove count badge #28

Closed innoflash closed 4 years ago

innoflash commented 5 years ago

Say i have a count of 0 (zero) how do i remove the badge from the icon?

gonzalomonzon02 commented 4 years ago

Hi, I solved this with the next line: bottomNavigation.setCount(TAB_HOME, MeowBottomNavigationCell.EMPTY_VALUE) If you need handle this when the user clicked on specific tab, you use setOnShowListener as follow:

bottomNavigation?.setOnShowListener {
            if (it.id == TAB_HOME) {
                bottomNavigation.setCount(TAB_HOME, MeowBottomNavigationCell.EMPTY_VALUE)
            }
        }
innoflash commented 4 years ago

Hi, I solved this with the next line: bottomNavigation.setCount(TAB_HOME, MeowBottomNavigationCell.EMPTY_VALUE) If you need handle this when the user clicked on specific tab, you use setOnShowListener as follow:

bottomNavigation?.setOnShowListener {
            if (it.id == TAB_HOME) {
                bottomNavigation.setCount(TAB_HOME, MeowBottomNavigationCell.EMPTY_VALUE)
            }
        }

Thanks buddy, i will definitely check it out

oneHamidreza commented 4 years ago

I updated the library with some improvements and bug fixes with ReadMe.md. Just check it.