我已经添加了一个有一些按钮的屏幕,我的屏幕是RelativeLayOut it LinearLayOut
下面是线性布局管理器的代码
<LinearLayout
android:orientation="horizontal"
android:gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:id="@+id/Footer"
android:layout_marginBottom="5dp">
以下是问题所在:
在顶部有一个EditText组件,它在屏幕上弹出一个软键盘,并将我的页脚管理器放在键盘的顶部,最终破坏了我的整个UI。
确切的解决方案是什么?
另外,我已经逐个删除了android:gravity="bottom"
和android:layout_alignParentBottom="true"
,但不幸的是我没有得到预期的结果。
谢谢
发布于 2010-11-29 18:04:51
将android:windowSoftInputMode="adjustPan"
添加到清单-添加到相应的活动:
<activity android:name="MyActivity"
...
android:windowSoftInputMode="adjustPan"
...
</activity>
发布于 2014-08-16 06:51:00
你可能想要
<activity
...
android:windowSoftInputMode="adjustNothing">
</activity>
这将防止在显示软键盘时进行任何布局更改。
这方面可能存在一些混淆,因为http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft的文档中目前缺少这一点
https://stackoverflow.com/questions/4301422
复制相似问题