Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/185.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 放置在抽屉布局中的EditText不响应触摸_Android - Fatal编程技术网

Android 放置在抽屉布局中的EditText不响应触摸

Android 放置在抽屉布局中的EditText不响应触摸,android,Android,当我尝试单击编辑文本时,什么也没有发生(键盘和光标没有出现)。isInEditMode()方法返回false。isFocused()方法也返回false <android.support.v4.widget.DrawerLayout android:id="@+id/drawer" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLa

当我尝试单击编辑文本时,什么也没有发生(键盘和光标没有出现)。isInEditMode()方法返回false。isFocused()方法也返回false

<android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/LightGrey">

       <EditText
        android:id="@+id/essay_edit"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="start|left"
        android:layout_marginLeft="6dp"
        android:layout_marginRight="6dp"
        android:layout_marginTop="2dp"
        android:background="@color/LightGrey"
        android:maxLines="500"
        android:textSize="19sp"
        android:typeface="serif" />
    </FrameLayout>

    <FrameLayout
        android:layout_width="280dp"
        android:layout_height="match_parent"
        android:layout_gravity="start">

        <include
            layout="@layout/drawer_layout" />

    </FrameLayout>


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

编辑文本
移动到
抽屉布局之外

<android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">



    <EditText
        android:id="@+id/essay_edit"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:gravity="start|left"
        android:layout_marginLeft="6dp"
        android:layout_marginRight="6dp"
        android:layout_marginTop="2dp"
        android:layout_weight="8"
        android:background="@color/LightGrey"
        android:maxLines="500"
        android:textSize="19sp"
        android:typeface="serif" />

    <FrameLayout
        android:layout_width="280dp"
        android:layout_height="match_parent"
        android:layout_gravity="start">

        <include
            layout="@layout/drawer_layout" />

    </FrameLayout>

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

不要仅在编辑文本时使用不相关的框架布局

<android.support.v4.widget.DrawerLayout
    android:id="@+id/drawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <EditText
        android:id="@+id/essay_edit"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:gravity="start|left"
        android:layout_marginLeft="6dp"
        android:layout_marginRight="6dp"
        android:layout_marginTop="2dp"
        android:layout_weight="8"
        android:background="@color/LightGrey"
        android:maxLines="500"
        android:textSize="19sp"
        android:typeface="serif" />

    <FrameLayout
        android:layout_width="280dp"
        android:layout_height="match_parent"
        android:layout_gravity="start">

        <include
            layout="@layout/drawer_layout" />

    </FrameLayout>

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


我将编辑文本移动到抽屉布局外部,编辑文本工作正常,但现在从左边缘向右滑动不再打开导航menu@bigDaddy你的导航视图在哪里?