I am trying to add more then 5 items in bottom navigation view but its causing inflate error.
According to Google's Material Design specification, BottomNavigationView does not support more than 5 items. You can use another library for BottomNavigationView since you can't achieve this with Google's library.
Create a menu resource with up to 5 navigation targets (BottomNavigationView does not support more than 5 items).
https://material.io/develop/android/components/bottom-navigation-view/
Secondly, Having 5 or more items in BottomNavigation is a bad design in terms of User Experience. Even 4 is a stretch. If you need more than 5 items, BottomNavigation is not suitable for you.
If you want that then u can take a Horizontal linear layout in that take the horizontal scroll and then take textview or button as much u like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With