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>
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"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With