-1

Androidマニフェストファイルでテーマを使用すると、ソフトキーボードを開いたときにスクロールが発生しないという問題が発生しました。テーマを削除して正常に動作し始めたため、これはレイアウトファイルコードです。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical" >

<ScrollView
    android:id="@+id/scrollView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:orientation="vertical" >

        <EditText
            android:id="@+id/editText2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10" />

        <EditText
            android:id="@+id/editText3"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10" />

        <EditText
            android:id="@+id/editText7"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10"
            android:inputType="textPersonName" />

        <EditText
            android:id="@+id/editText1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10" >

            <requestFocus />
        </EditText>

        <EditText
            android:id="@+id/editText4"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10" />

        <EditText
            android:id="@+id/editText6"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10" />

        <EditText
            android:id="@+id/editText5"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ems="10" />

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Button" />
    </LinearLayout>
</ScrollView>

誰かが以前にそのような奇妙な問題に遭遇したことがありますか、回避策があるかどうか教えてください。現在、私は単にテーマに設定するのではなく、すべての異なるレイアウトに背景を設定しています。

4

1 に答える 1

0

おそらく、テーマをとして設定し、UIの再調整を停止するのと同様 の動作"full window"を削除します"title bar"android:windowSoftInputMode="adjustPan"

于 2012-10-10T05:37:32.093 に答える