Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android BottomNavigationView disable icon title

I am trying to create Bottom navigation view in android without a title, but I'm unable to hide the title. Also, I need to active and inactive icon colour for Bottom navigation view.

Expected design enter image description here

Current design enter image description here

<android.support.design.widget.BottomNavigationView
    android:id="@+id/bottomNavigationView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="start"
    android:layout_alignParentBottom="true"
    android:background="@color/bottom_nav_colour"
    app:itemTextColor="@color/black"
    app:itemIconTint="@color/black"
    design:menu="@menu/bottom_navigation" />

bottom_navigation.xml

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/menu_home"
        android:title="@string/menu_home"
        android:icon="@drawable/home" />

    <item
        android:id="@+id/menu_search"
        android:title="@string/menu_search"
        android:icon="@drawable/search"/>

    <item
        android:id="@+id/menu_add"
        android:title="@string/menu_add"
        android:icon="@drawable/add"/>

    <item
        android:id="@+id/menu_wishlist"
        android:title="@string/menu_wishlist"
        android:icon="@drawable/wishlist"/>

    <item
        android:id="@+id/menu_account"
        android:title="@string/menu_account"
        android:icon="@drawable/account" />
</menu>
like image 919
Navaneeth Kishen Avatar asked Jan 28 '17 04:01

Navaneeth Kishen


1 Answers

In the latest support library for BottomNavigationView you can use labelVisibility

like image 159
Jason Grife Avatar answered Nov 02 '22 01:11

Jason Grife