TextViewfor ステートメント、FrameLayoutanswer layout のコンテナー ( など)、および next 、 previous を使用して、質問のマスター レイアウトを 1 つ作成する必要がありますButton。コンテナには、編集可能な回答用のListViewと の2 つのビューを配置できます。EditTextGONEとしての両方の可視性。
マスター レイアウトが表示されたら、各質問を同じレイアウトにロードできます。質問にオプションがある場合は、ステートメントビューのテキストを設定する必要があります。表示を設定ListViewし、データをロードして、単一/複数選択に設定します。それ以外の場合、質問に編集可能な回答がある場合は、表示を設定しEditTextます (表示を非表示に設定ListViewします)。
これは、質問ごとに個別のレイアウトを膨らませるよりもはるかに効率的です。またListView、任意の数のオプションを完全に処理し、単一/複数の選択肢にすることができ、画面サイズに関係なく任意のオプションにスクロールできます.
レイアウト XML:
<?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">
    <TextView android:id="@+id/question__Statement"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
            />
    <FrameLayout android:layout_width="match_parent"
                 android:layout_height="0dp"
                 android:layout_weight="1"
            >
        <ListView android:id="@+id/question__options"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:visibility="gone"
                />
        <EditText android:id="@+id/question__text"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:visibility="gone"
                />
    </FrameLayout>
    <LinearLayout android:layout_width="match_parent"
                  android:layout_height="wrap_content"
            >
        <Button android:id="@+id/question__prev"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_alignParentLeft="true"
                android:text="Previous"
                />
        <Button android:id="@+id/question__next"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_alignParentRight="true"
                android:text="Next"
                />
    </LinearLayout>
</LinearLayout>