Android BottomNavigationView evenly spaced icons

Johan Nordberg picture Johan Nordberg · Nov 30, 2016 · Viewed 7.5k times · Source

I have a BottomNavigationView with five items. The default behavior is to only show the label of the selected item and the spacing between all five items differs depending on what item is selected.

I would like a bottom bar more simular to a UITabBar on iOS. Is this possible with BottomNavigationView or can you recommend some other library that solves this?

Answer

Dan  Meng picture Dan Meng · Dec 27, 2016

You just need to disable the shift mode: How to disable BottomNavigationView shift mode?

When you have more than 3 tabs, the shift mode is enabled by default. This can only be set to disabled by tricky method using Reflection now.