Я пытаюсь сделать BottomNavigationView, но он отображается в виде меню прокрутки.Я пытаюсь получить что-то вроде этого: Image1:
Но в моем проекте это выглядит так:
У меня есть основной XML:
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:design="http://schemas.android.com/apk/res-auto"
tools:context=".PostOrSearch">
<android.support.design.widget.NavigationView
android:layout_width="420dp"
android:layout_height="70dp"
android:layout_gravity="start"
android:layout_marginTop="8dp"
app:layout_insetEdge="bottom"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0"
design:menu="@menu/manu_layout"
/>
И XML меню:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:title="Perfil"
android:icon="@drawable/perfil"/>
<item
android:title="Search"
android:icon = "@drawable/search"/>
<item
android:title="Post"
android:icon = "@drawable/megaphone"/>