Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BottomNavigationView disable shift mode without using reflection

enter image description here

BottomNavigationView doesn't allow disabling shift mode has this issue fixed in new version of support library?

Also there are some solutions which use reflection mechanism I don't think its right way is there any solution to this major problem.

All ready seen this solution don't want to use this

like image 513
amodkanthe Avatar asked Jan 13 '17 06:01

amodkanthe


2 Answers

If possible then update to android sdk-28 then add app:labelVisibilityMode="labeled" in your xml.

like image 176
Bali Avatar answered Nov 18 '22 21:11

Bali


You just need to update to 28.0.0 support library! They already provided setLabelVisibilityMode() method to disable the shifting

navButton.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED);

for more info, check this out https://developer.android.com/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode.html#LABEL_VISIBILITY_SELECTED

like image 1
Fadzli Razali Avatar answered Nov 18 '22 21:11

Fadzli Razali