【发布时间】:2014-09-06 17:37:35
【问题描述】:
我有以下布局:
<?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 上的横向视图中,它看起来像:
有没有办法解决这个问题,但保留标志 flagNoExtractUi ?
【问题讨论】:
-
在给定的链接上给出了一些可能的答案:stackoverflow.com/questions/3295672/…
-
请查看我的answer。
-
你在清单文件developer.android.com/guide/topics/manifest/…的活动标签中尝试过android:windowSoftInputMode="stateVisible|adjustResize"吗
-
是的。所以我的问题是它看起来像这样,显示了键盘。我在显示或隐藏键盘方面没有问题,但它必须在横向打开和关闭键盘时看起来都很好
标签: android android-edittext flags soft-keyboard