Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bottom Navigation View does not show the icons or titles

I am making an application with three items in the bottom navigation bar. I tried implementing it. The code looks fine, there are no errors, it just won't show the icons or the labels. I looked at other similar questions but none of them have an answer that i am looking for.

I am using android studio 3.3

Here is my Bottom Navigation View:

<RelativeLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  xmlns:app="http://schemas.android.com/apk/res-auto">

  <android.support.design.widget.BottomNavigationView
     android:layout_width="match_parent"
     android:layout_height="56dp"
     android:layout_alignParentStart="true"
     android:layout_alignParentBottom="true"
     app:menu="@menu/nav_items" />

The nav_items file

<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
    android:icon="@drawable/outline_home_black_18dp"
    android:title="@string/nav_home" />
<item
    android:icon="@drawable/outline_home_black_18dp"
    android:title="@string/nav_search" />
<item
    android:icon="@drawable/outline_home_black_18dp"
    android:title="@string/nav_account" />
</menu>
like image 248
Minwal Avatar asked Oct 27 '25 06:10

Minwal


1 Answers

Try to use this :

<android.support.design.widget.BottomNavigationView
 android:layout_width="match_parent"
 android:layout_height="56dp"
 android:layout_alignParentStart="true"
 android:layout_alignParentBottom="true"
 app:menu="@menu/nav_items" 
 app:labelVisibilityMode="labeled"/>
like image 81
Tamir Abutbul Avatar answered Oct 28 '25 22:10

Tamir Abutbul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!