【发布时间】:2017-07-27 14:04:34
【问题描述】:
当键盘显示在我的应用程序上时,我想将布局向上移动。我使用了adjustResize、adjustPan 和他们两者的活动,但它们都不起作用,它仍然在表单上显示键盘并且不移动上面的布局。
这是我的布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
............... my views
</LinearLayout>
</ScrollView>
</RelativeLayout>
我怎样才能让它工作?
【问题讨论】:
-
尝试添加 android:isScrollContainer="false" 与 android:windowSoftInputMode="adjustNothing" 或 android:windowSoftInputMode="adjustPan"
标签: android android-layout android-xml