如何在baseadapter中的radiogroup中动态添加单选按钮。

时间:2011-11-01 13:07:49

标签: android

  

可能重复:
  how to generate dynamic RadioButton with a radiongroup in adapterView?

我的动态列表存在问题。

我想在radiobutton中显示所有选项列表。所以我拿了一个xml的广播gruop就在那里。

我想从baseadapter获取radionutton。

<LinearLayout
    android:id="@+id/type2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

        <RadioGroup 
            android:id="@+id/optionRadioGroup"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >  
            <RadioButton
                android:id="@+id/optionRadio"
                android:layout_width="wrap_content"
                android:layout_height="45dip"
            />

        </RadioGroup>


  </LinearLayout>
建议我这样做。

提前坦克。

0 个答案:

没有答案