Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android BottomNavigationView unselected text not showing [duplicate]

I am using android.support.design.widget.BottomNavigationView. All is fine except the titles not showing when not selected.

enter image description here

<!-- layout -->
<android.support.design.widget.BottomNavigationView
    android:id="@+id/bnvBar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:background="@android:color/background_light"
    android:theme="@style/BottomNavigationTheme"
    app:menu="@menu/bottom_navigation_main" />

<!-- theme -->
<style name="BottomNavigationTheme" parent="Theme.AppCompat.Light">
    <item name="colorPrimary">@color/orange</item>
</style>

What is missing?

like image 316
Sean Avatar asked Jan 22 '19 04:01

Sean


1 Answers

If you are using Support Library 28 Try this,

app:labelVisibilityMode="labeled"

Full code

    <android.support.design.widget.BottomNavigationView
        android:id="@+id/bnvBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@android:color/background_light"
        android:theme="@style/BottomNavigationTheme"
        app:menu="@menu/bottom_navigation_main" 
        app:labelVisibilityMode="labeled"
    />
like image 119
Saikrishna Rajaraman Avatar answered Oct 07 '22 06:10

Saikrishna Rajaraman