Android 在调整IME大小时缩小滚动视图-我做错了什么?
我正试图使下面的ScrollView缩小,以便在使用IME时,上面的所有其他元素仍然可见,或者,至少,使ScrollView的顶部向下移动到屏幕顶部 Main.xml:Android 在调整IME大小时缩小滚动视图-我做错了什么?,android,resize,scrollview,android-softkeyboard,ime,Android,Resize,Scrollview,Android Softkeyboard,Ime,我正试图使下面的ScrollView缩小,以便在使用IME时,上面的所有其他元素仍然可见,或者,至少,使ScrollView的顶部向下移动到屏幕顶部 Main.xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" androi
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="match_parent"
android:orientation="vertical" android:id="@+id/gameLayout">
<TextView android:id="@+id/gameTitle" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:textColor="@color/Red"
android:maxLines="1" />
<ScrollView android:id="@+id/gameScroll"
android:layout_width="match_parent" android:layout_height="fill_parent"
android:fillViewport="false" android:layout_above="@+id/gameEntry"
android:layout_below="@+id/gameTitle">
<TextView android:id="@+id/gameText" android:layout_width="match_parent"
android:layout_height="wrap_content" android:scrollbars="vertical" />
</ScrollView>
<AutoCompleteTextView android:id="@+id/gameEntry"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:layout_toLeftOf="@+id/gameSubmit"
android:hint="@string/Hint" android:imeOptions="actionDone"
android:lines="1" />
<TextView android:id="@+id/gameSubmit" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignBaseline="@+id/gameEntry"
android:layout_alignParentRight="true" android:gravity="center"
android:text="@string/Submit" android:textColor="@color/Red"
android:textSize="18dp" android:lines="1" />
</RelativeLayout>
而且,我还向清单中添加了android:windowSoftInputMode=“adjustResize”
,它仍然在平移。。。提示3..2..1中的“哇,这是一个愚蠢的问题”…尝试将滚动视图上的android:layout\u height=“fill\u parent”
更改为android:layou height=“wrap\u content”
并将android:layou over=“@+id/gameEntry”
添加到滚动视图中,谢谢,但没有用。我有android:layout_over=“@+id/gameEntry
,我试过包装内容,但也没用。谢谢。你解决过这个问题吗?我不确定……我放弃了那个项目,因为那是一个学校项目。谢谢。