I use bottom navigation view for my app and want to remove the text under the icon. I looked for it on the internet but still can\'t find the solution. Did anyone use to dea
I find the solutions please check the below small changes.
First of all change in bottomnavigation menu xml:
Updated xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_favorites"
android:enabled="true"
android:icon="@drawable/ic_search"
android:title=""
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_schedules"
android:enabled="true"
android:icon="@drawable/ic_search"
android:title=""
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_music"
android:enabled="true"
android:icon="@drawable/ic_search"
android:title=""
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_me"
android:enabled="true"
android:icon="@drawable/ic_search"
android:title=""
app:showAsAction="ifRoom" />
</menu>
set "app:labelVisibilityMode" with "unlabeled"
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:labelVisibilityMode="unlabeled"/>
All you need to do is add this in your BottomNavigationView and the title and annoying animation is gone app:labelVisibilityMode="unlabeled"
Remove titles in menu items.Then apply padding top to bottomnavigationview like below
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_favorites"
android:tittle=""
android:enabled="true"
android:icon="@drawable/ic_search"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_schedules"
android:tittle=""
android:enabled="true"
android:icon="@drawable/ic_search"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_music"
android:tittle=""
android:enabled="true"
android:icon="@drawable/ic_search"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_me"
android:tittle=""
android:enabled="true"
android:icon="@drawable/ic_search"
app:showAsAction="ifRoom" />
In Bottom navigation view
<android.support.design.widget.BottomNavigationView
android:background="@color/whiteColor"
android:id="@+id/bottom_navigation_bar"
android:layout_weight="1.5"
android:paddingTop="16dp"
app:menu="@menu/menu_bottom_navigation"
android:layout_width="match_parent"
android:layout_height="0dp">