I'm implementing a Navigation View on my activityHome
for the first time. When i run the app and enter the home activity it function well. The problem is at the XML editor on the android studio, the Nav View
is above all the other elements and doesn't let me click on them.
I haven't touch anything else but these yet. Thanks.
XML CODE:
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout 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:id="@+id/dl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:fitsSystemWindows="true"
tools:context=".activities.HomeActivity"
tools:openDrawer="start">
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/header"
android:background="@color/colorPrimary"
app:menu="@menu/menu"
tools:ignore="MissingConstraints" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageButton
android:id="@+id/iv_menu"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?android:selectableItemBackground"
android:scaleType="centerInside"
app:layout_constraintBottom_toTopOf="@+id/guideline46"
app:layout_constraintEnd_toStartOf="@+id/guideline139"
app:layout_constraintStart_toStartOf="@+id/guideline135"
app:layout_constraintTop_toTopOf="@+id/guideline45"
android:elevation="10dp"
app:srcCompat="@drawable/menubuttonofthreelines_79781" />
...
and continues with the other elements.