Grey rectangle shown on drawer NavigationView when hiding android home buttons

Viewed 78

My screen doesn't show the android home buttons and I'm running Android 7.0. I see a grey rectangle in the bottom, the height of where the buttons would be:

enter image description here

activity_payment.xml:

<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/drawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true"
    tools:context=".ui.activities.PaymentActivity">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="@dimen/status_bar_height"
        android:orientation="vertical">

    </androidx.constraintlayout.widget.ConstraintLayout>

    <include
        android:id="@+id/navigation_layout"
        layout="@layout/navigation_layout" />

</androidx.drawerlayout.widget.DrawerLayout>

I tried android:elevation="10dp" and android:translationZ="10dp":

navigation_layout.xml:

<com.google.android.material.navigation.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:elevation="10dp"
    app:headerLayout="@layout/nav_header_main"
    app:itemIconTint="@drawable/drawer_selector"
    app:itemTextColor="@drawable/drawer_selector"
    app:menu="@menu/navigation_drawer">
</com.google.android.material.navigation.NavigationView>

nav_header.xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/nav_header"
    android:layout_width="match_parent"
    android:layout_height="@dimen/nav_header_height"
    android:orientation="vertical">

    <ImageView
        android:id="@+id/drawer_company_logo"
        android:layout_width="wrap_content"
        android:layout_height="38dp"
        android:gravity="start"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        android:scaleType="fitStart"
        android:layout_gravity="start"
        android:paddingBottom="@dimen/padding_small"
        app:srcCompat="?brandingLogo" />

</LinearLayout>
1 Answers
Related