Android 放置在抽屉布局中的EditText不响应触摸
当我尝试单击编辑文本时,什么也没有发生(键盘和光标没有出现)。isInEditMode()方法返回false。isFocused()方法也返回falseAndroid 放置在抽屉布局中的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
<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你的导航视图在哪里?