Background image covering the navdrawer

1

I have an activity with a navdrawer on it. And I would like to put a background image on this activity. But when I put the image, the nav disappears, the image is over it. The nav does not lose the function, if it clicks on the image it opens normally, but it does not appear. How can I resolve this issue?

XML below:

 <?xml version="1.0" encoding="utf-8"?>

<android.support.v4.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_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <include
        layout="@layout/app_bar_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/nav_header_main"
        app:menu="@menu/activity_main_drawer" />

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_marginStart="@dimen/nav_header_vertical_spacing"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        tools:context=".activity.MainActivity"
        android:background="@drawable/fundo"
        android:layout_alignParentStart="true"
        android:layout_alignParentEnd="true">

        <Button android:id="@+id/btnRoute"
            android:layout_width="223px"
            android:layout_height="327px"
            android:gravity="center"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="100dp"
            android:background="@drawable/rota"/>

        <Button android:id="@+id/btnKeeper"
            android:layout_width="223px"
            android:layout_height="224px"
            android:gravity="center"
            android:layout_below="@+id/btnRoute"
            android:layout_alignStart="@+id/btnRoute"
            android:background="@drawable/keeper"
        />

        <Button android:id="@+id/btnMap"
            android:layout_width="223px"
            android:layout_height="223px"
            android:gravity="center"
            android:layout_below="@+id/btnKeeper"
            android:layout_alignStart="@+id/btnKeeper"
            android:background="@drawable/prevencao"
        />

    </RelativeLayout>

</android.support.v4.widget.DrawerLayout>

Image or background should be in android.support.v4.widget.DrawerLayout .. and not in relative layout .. solution was this

    
asked by anonymous 20.05.2016 / 03:17

1 answer

0

Image or background should be in android.support.v4.widget.DrawerLayout .. and not relative layout

    
20.05.2016 / 20:42