0

次の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"
    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>

これはできますか?私はおそらくいくつかのばかげた間違いを犯した...ああ、キーボードが私のEditTextを隠すのを防ぐ方法で彼らが推奨したことはすべてやった?

そして、私もandroid:windowSoftInputMode="adjustResize"マニフェストに追加しましたが、まだパンしています... 3..2..1で「うわー、それはばかげた質問です」をキューに入れます......

4

1 に答える 1

0

の を に変更し、android:layout_height="fill_parent"ScrollView追加android:layout_height="wrap_content"android:layout_above="@+id/gameEntry"てみてくださいScrollView

于 2012-04-19T21:02:52.980 に答える