Android 安卓:显示键盘会将我的组件向上移动,我想隐藏它们
我添加了一个线性布局,有一些按钮,我的屏幕是相对的 下面是线性布局管理器的代码Android 安卓:显示键盘会将我的组件向上移动,我想隐藏它们,android,android-layout,Android,Android Layout,我添加了一个线性布局,有一些按钮,我的屏幕是相对的 下面是线性布局管理器的代码 <LinearLayout android:orientation="horizontal" android:gravity="bottom" android:layout_alignParentBottom="true" android:layout_height="wrap_content" android:layout_width="fill_parent"
<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\u alignParentBottom=“true”
,但由于运气不好,我没有得到想要的结果
感谢将android:WindowsOfInputMode=“adjustPan”添加到清单-添加到相应的活动:
<activity android:name="MyActivity"
...
android:windowSoftInputMode="adjustPan"
...
</activity>
您可能想要
<activity
...
android:windowSoftInputMode="adjustNothing">
</activity>
经过一番挖掘,我了解了这一行android:windowSoftInputMode=“adjustPan”
,但我不知道在哪里添加它?在menifest或屏幕的主要相对布局中?这是否有可能不删除,android:gravity=“bottom”和android:layout\u alignParentBottom=“true”?@Asahi对此的任何想法都不适用于网络视图中的编辑文本,将其隐藏。这拯救了我的一天!谢谢我不明白为什么投票数会少很多。这是一个有效的,谢谢!这应该是一个!这对我有效,而其他人却没有!