フォームアクティビティをロードするタブホストレイアウトがあります(スクロールバーに10入力)。一番下の入力で入力を開始すると、キーボードが表示され、フォーカスされた入力が表示されず (通常のようにスクロールするのではなく、キーボードが入力に重なって表示されます)、何を入力しているのかわかりません。タブホストの外でフォームアクティビティを実行しようとすると、すべてが正常に機能し、常にフォーカスされた入力を入力して表示できます。私の最小 API レベルは 10、最大は 17 です。
どんな助けや方向性も高く評価されています。
タブホストのレイアウト:
<?xml version="1.0" encoding="UTF-8"?>
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<RelativeLayout
android:id="@+id/layTab"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:gravity="center"
android:background="#00A99D"
android:paddingLeft="0dip"
android:paddingRight="0dip" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center|bottom"
android:padding="0dip" />
</RelativeLayout>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_above="@id/layTab"/>
</RelativeLayout>
フォームのレイアウト:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#eee"
android:padding="0dip"
android:layout_alignParentBottom="true">
<LinearLayout
android:id="@+id/body"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/header"
android:orientation="vertical" >
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="1"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="2"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="3"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="4"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="5"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="6"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="7"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="8"
android:ems="10" />
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi"
android:hint="9"
android:ems="10"/>
<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="10"
android:ems="10" />
</LinearLayout>
</ScrollView>
</LinearLayout>