Reputation: 28103
I am trying out newly released BottomNavigationView from android support library com.android.support:appcompat-v7:25.0.0
My assumption was menu icons will be center_vertial aligned if I don't setup menu titles but thats not happening. Below is sample screenshot.
Can someone point me in correct direction if its possible at all without rolling down and custom view? I am targeting following output.
Upvotes: 2
Views: 6023
Reputation: 197
You can use app:labelVisibilityMode="unlabeled"
to hide the labels this way the icons will be aligned to center
Upvotes: 2
Reputation: 1081
It's quite late, but you can add app:labelVisibilityMode="unlabeled"
to your BottomNavigationView
tag
Upvotes: 3
Reputation: 3028
You can use android:paddingTop="15dp"
and use android:background="@color/colorPrimary"
instead of app:itemBackground="@color/colorPrimary"
Or you can use Libs like https://github.com/ittianyu/BottomNavigationViewEx
Upvotes: 0
Reputation: 1044
The space below your images is the titles' space (Empty TextView). I believe that they currently don't support an image without a text. (MenuItem
must have a title, else it throws an error in xml).
Upvotes: 1