【发布时间】:2014-12-17 15:05:37
【问题描述】:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<LinearLayout
android:layout_gravity="bottom"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</FrameLayout>
在清单中:
android:windowSoftInputMode="adjustPan"
初始行为:
当前行为:
期望的行为:
如何实现所需的布局行为? adjustResize 不合适,因为此选项会调整布局大小。
感谢您的回答!
【问题讨论】:
-
我认为你应该使用滚动视图作为主要的父布局
-
对不起,我不明白你的意图。假设在文本视图的上方和下方还有另外两个按钮;您希望的行为是什么?如果一切都向上移动,那怎么不是adjustResize?
标签: android android-softkeyboard