我的应用程序具有android:windowSoftInputMode="adjustResize"属性,并且在Android 2.1上表现正常:
软键盘出现之前
打开键盘
然而,在Honeycomb中,软键盘不会调整我的布局大小,而是覆盖了按钮:
在10英寸的Galaxy Tab和Motorola Xoom上都有相同的行为。
我已经多次重新设计我的布局以使其与Honeycomb兼容,但无济于事。软键盘只会推动EditText视图,而不是按钮。
编辑:链接已修复。
使用的布局:
<?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_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_alignParentBottom="true">
<Button
android:id="@+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Save" />
<Button
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<EditText
android:layout_height="wrap_content"
android:layout_width="fill_parent" />
</ScrollView>
</RelativeLayout>
我发现唯一相关的问题是这个,但禁用硬件加速对我没有任何影响。我还阅读了Android指南,使您的应用程序兼容输入方法,但在那里没有找到任何解决方案。我是否做错了什么显而易见的事情?或者这是一个有更多信息的错误吗?
android:windowSoftInputMode
,它对我来说似乎都很正常。我所做的就是创建一个新项目,并用你的布局替换了main.xml。我无法下载你的示例项目。 - Nicklas A.