1 year ago

#379091

test-img

nought01

How to add text to inactive buttons in the bottom menu?

I use com.google.android.material.bottomnavigation.BottomNavigationView for the bottom menu design. My code

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/home"
        android:icon="@drawable/ic_home"
        android:enabled="true"
        android:title="@string/title_home" />
    <item
        android:id="@+id/search"
        android:icon="@drawable/ic_search"
        android:enabled="false"
        android:title="@string/title_search"/>
    ...
</menu>

I want the button titles to show under all buttons but only show under the selected one. Perhaps there is a separate function for this?

android

bottomnavigationview

0 Answers

Your Answer

Accepted video resources