In my app, using bottom navigation bar. Inside bottom navigation bar,text not needed. so i put android:title="" but that icon always in top. how to set center?
Asked
Active
Viewed 5,047 times
0
Rob
- 2,133
- 3
- 29
- 39
Deepankumar
- 57
- 4
- 10
-
2try [this answer](https://stackoverflow.com/a/44342585/8089770) – Vidhi Dave Oct 09 '17 at 12:49
-
if you done this issues, please help me out from this. – chari sharma Apr 11 '18 at 11:05
-
Maybe this answer can help you [BottomNavigationViewHelper](https://stackoverflow.com/a/47547040/5468224) – snti Jul 02 '18 at 17:41
-
If you have solved could you please post the solution as i am also facing the same problem. – bhaskar Jan 31 '19 at 08:58
2 Answers
5
You can add the app:labelVisibilityMode attribute to BottomNavigationView like below. Then it automatically center positions the icons.
<android.support.design.widget.BottomNavigationView
...
app:labelVisibilityMode="unlabeled"
/>
Praneeth
- 587
- 7
- 10
-5
Just add a space ( ). This will consider a white space. Also try adding !important along with the value of property and this might also help you.
Venkat Ramanan
- 187
- 1
- 7