Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BottomNavigationView menu item title not showing when inactive [XML]

Tags:

android

xml

now : https://i.sstatic.net/lgdaa.png

I have a bottom navigation bar. Case: the text of bottom navigation bar item menu is not showing when the tab inactive. Text only shows when the tab is active. What should to show the icon title even when the tab menu is inactive?

<android.support.design.widget.BottomNavigationView
            android:id="@+id/navigation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="?android:attr/windowBackground"
            android:theme="@style/BottomNavigationTheme"
            app:menu="@menu/menu"/>

And the styles :

    <style name="BottomNavigationTheme" parent="Theme.AppCompat.Light">
        <item name="colorPrimary">@color/tabActive</item>
        <item name="android:textColorSecondary">@color/tabInactive</item>
    </style>
like image 643
yoppie97 Avatar asked Sep 01 '25 16:09

yoppie97


1 Answers

This is the method you're looking for.

Or in XML,

app:labelVisibilityMode="labeled"

Hope this will help you

like image 167
Abhishek Bhardwaj Avatar answered Sep 04 '25 06:09

Abhishek Bhardwaj