无法单击NavigationDrawer项目

时间:2017-04-16 12:11:10

标签: android xml

我的导航抽屉由于某种原因是透明的,如果我尝试点击它,如果它下面有一个视图,它就不会注册点击。我不知道为什么它如此透明,无论如何。

XML:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
    android:clickable="false">

    <android.support.v4.widget.DrawerLayout
        android:id="@+id/drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="false"
        tools:openDrawer="start">

        <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:layout_marginTop="?attr/actionBarSize"
            android:background="#311b92"
            android:clickable="true"
            android:fitsSystemWindows="false"
            android:focusable="false"
            app:menu="@menu/activity_homescreen_drawer" />

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

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

</FrameLayout>

0 个答案:

没有答案
相关问题