ilo*_*mbo 4 expand android landscape android-edittext
我有这个布局

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/viewer_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/background_dark"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="3dp"
android:layout_weight="1" >
<EditText
android:id="@+id/viewer_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_filter"
android:background="@android:color/white"
android:drawableLeft="@android:drawable/ic_menu_search"
android:inputType="text"
android:paddingLeft="4dp"
android:selectAllOnFocus="true" >
</EditText>
<ImageView
android:id="@+id/viewer_filterX"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/viewer_filter"
android:layout_alignRight="@id/viewer_filter"
android:src="@android:drawable/ic_menu_close_clear_cancel"
android:visibility="invisible" >
</ImageView>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="5dp"
android:layout_weight="1" >
<EditText
android:id="@+id/viewer_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_search"
android:background="@android:color/white"
android:drawableLeft="@android:drawable/ic_menu_search"
android:inputType="text"
android:paddingLeft="4dp"
android:selectAllOnFocus="true" >
</EditText>
<ImageView
android:id="@+id/viewer_searchGo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/viewer_search"
android:layout_alignRight="@id/viewer_search"
android:src="@android:drawable/ic_menu_send"
android:visibility="invisible" >
</ImageView>
<ImageView
android:id="@+id/viewer_searchX"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/viewer_search"
android:layout_toLeftOf="@id/viewer_searchGo"
android:src="@android:drawable/ic_menu_close_clear_cancel"
android:visibility="invisible" >
</ImageView>
</RelativeLayout>
</LinearLayout>
<HorizontalScrollView
android:id="@+id/viewer_hscroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/viewer_top" >
<ListView
android:id="@+id/viewer_list"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
</HorizontalScrollView>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
当我单击EditText时,它会扩展到此对话框:

在纵向模式下,可以按原样编辑EditTexts而不进行扩展.纵向的XML类似,只有EditTexts是一个在另一个之下并且是屏幕宽的.
如何防止此EditText扩展?
EditText +虚拟键盘不仅隐藏了完整的手机屏幕,而且我放在EditText上的可点击图像也不可见.
更新
我删除了layout-land XML并对纵向和横向使用了相同的XML.
在纵向模式下它很好,没有扩展,在横向模式下有扩展.
所以它必须以某种方式处于横向模式.
Shr*_*a S 12
将此行添加到编辑文本中
android:imeOptions="flagNoFullscreen"
Run Code Online (Sandbox Code Playgroud)
编辑文本看起来像这样
<EditText
android:id="@+id/viewer_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="hint_filter"
android:background="@android:color/white"
android:drawableLeft="@android:drawable/ic_menu_search"
android:inputType="text"
android:paddingLeft="4dp"
android:selectAllOnFocus="true"
android:imeOptions="flagNoFullscreen">
Run Code Online (Sandbox Code Playgroud)