0

名前、パスワード 1 フィールドがスクロールビューに表示されない他のすべてがここで適切に機能するのは、私の xml です.1 つの子のみをサポートするため、スクロールビューの後に線形レイアウトを作成しました。何が問題なのですか?

<?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="wrap_content"
   android:layout_gravity="center"
   android:orientation="vertical" >

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

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

            <EditText
                android:id="@+id/name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Name" />

        <EditText
            android:id="@+id/password1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="@string/password"
            android:inputType="textPassword" />

        <EditText
            android:id="@+id/password2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="@string/retype"
            android:inputType="textPassword" />

        <EditText
            android:id="@+id/email"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="@string/email"
            android:inputType="textEmailAddress" />

        <TextView
            android:id="@+id/gender"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Gender" />

        <RadioGroup
            android:id="@+id/radiogroup"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <RadioButton
                android:id="@+id/male"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Male" />

            <RadioButton
                android:id="@+id/female"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Female" />
        </RadioGroup>

        <ImageView
            android:id="@+id/capcha"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_launcher" />

        <EditText
            android:id="@+id/typecaptcha"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Type" />

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

</LinearLayout>
4

1 に答える 1

0

私にとっては、Password フィールドは正常に機能しているようです (XML をコピーしてテストしました)。Eclipse を使用している場合は、[Project] > [Clean] を試してください。同様の問題がありました。

ハッピーコーディング

編集(結果):

ここに画像の説明を入力

于 2013-06-12T09:55:00.917 に答える