android软键盘覆盖横向编辑文本

android软键盘覆盖横向编辑文本,android,android-edittext,flags,soft-keyboard,Android,Android Edittext,Flags,Soft Keyboard,我的布局如下: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Li

我的布局如下:

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

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">

    <LinearLayout
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:orientation="vertical"
            android:layout_above="@+id/edittext">

        <TextView
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:text="line1"/>

        <TextView
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:text="line2"/>

        <TextView
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:text="line3"/>

    </LinearLayout>

    <EditText
            android:id="@id/edittext"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:layout_margin="5dp"
            android:text="test"
            android:layout_alignParentBottom="true"
            android:imeOptions="flagNoExtractUi"
            />
</RelativeLayout>

在Nexus one上的景观中,它看起来像:


有没有办法解决这个问题,但要保留flagNoExtractUi?

您可以添加一个
滚动视图,这样当键盘出现时,它会自动滚动以使视图完全可见。

在Android清单中定义
,如下所示:

<activity android:name=".TodoEdit"
            android:windowSoftInputMode="adjustResize">


这似乎是Android中的一个bug,但我找到了一个解决方案!只需将
android:imeOptions=“flagNoExtractUi”
替换为
android:imeOptions=“flagNoFullscreen”
,现在一切都可以正常工作了。

在给定的链接上给出了一些可能的答案:请检查我的。您是否在menifest文件的活动标记中尝试了android:windowSoftInputMode=“stateVisible | adjustResize”是的。所以我的问题是,它看起来像这样的键盘显示。我在显示或隐藏键盘方面没有问题,但它必须在Landscape中同时打开和关闭键盘的情况下查看o。我已经这样做了,但它不起作用。查看我在问题中的最后一条评论flagNoExtractUi标志是什么,在Android中首次听到。用于指定IME不需要显示其提取的文本UI。对于可能是全屏的输入法,通常在横向模式下,这允许它们更小,并让应用程序的一部分显示在后面。虽然用户对应用程序的访问可能会受到限制,但它可以减少(大部分)全屏时间的不和谐体验。请注意,当指定此标志时,IME可能无法设置为能够显示文本,因此应仅在不需要此标志的情况下使用。