0
嗨,那里,我有2个不同的RadioGroup中的4个单选按钮,我需要像往常一样,每组只能选择一个,但它不工作,有什么建议吗?RadioButton select not working
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView1" android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout android:background="#ffffff"
android:layout_width="match_parent" android:layout_height="match_parent"
android:stretchColumns="1">
<RadioGroup android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical"
android:id="@+id/radGroupDep">
<TableRow>
<RadioButton android:id="@+id/radDepAir"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left"></RadioButton>
<Spinner android:id="@+id/spinDepAir" android:layout_height="wrap_content"
android:layout_width="match_parent" android:gravity="right"></Spinner>
</TableRow>
<TableRow>
<RadioButton android:id="@+id/radDepTow"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left"></RadioButton>
<Spinner android:id="@+id/spinDepReg" android:layout_height="wrap_content"
android:layout_width="match_parent" android:gravity="right"></Spinner>
</TableRow>
</RadioGroup>
<RadioGroup android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical"
android:id="@+id/radGroupArr">
<TableRow>
<RadioButton android:id="@+id/radArrAir"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left"></RadioButton>
<Spinner android:id="@+id/spinArrAir" android:layout_height="wrap_content"
android:layout_width="match_parent" android:gravity="right"></Spinner>
</TableRow>
<TableRow>
<RadioButton android:id="@+id/radArrTow"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left"></RadioButton>
<Spinner android:id="@+id/spinArrReg" android:layout_height="wrap_content"
android:layout_width="match_parent" android:gravity="right"></Spinner>
</TableRow>
</RadioGroup>
</TableLayout>
</ScrollView>
你必须把单选按钮放在收音机组 – 2011-04-29 09:15:06
里面,它们已经是 – Zerho 2011-05-02 14:26:13