Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android BottomNavigationView evenly spaced icons

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?

like image 504
Johan Nordberg Avatar asked Nov 30 '16 20:11

Johan Nordberg


1 Answers

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.

like image 143
Dan Meng Avatar answered Oct 04 '22 05:10

Dan Meng