Java
Need help with android_radiogroup_MutilRadioGroup?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
pheng

Description

android multiform RadioGroup:复杂样式的单选框,自定义RadioGroup实现radiobutton多行多列嵌套在各种布局中排列布局

132 Stars 64 Forks 9 Commits 3 Opened issues

Services available

Need anything else?

android MutilRadioGroup

android MutilRadioGroup:复杂样式的单选框,自定义RadioGroup实现radiobutton多行多列排列布局

根据RadioGroup源码修改而来,实现支持RadioGroup里面的RadioButton嵌套在其他布局里,从而实现复杂布局的单选框功能。

使用的时候只用把MyRadioGroup类拷到自己的工程里就可以引用。

1、使用与RadioGroup一样,MutilRadioGroup里的所有RadioButton(包括MutilRadioGroup里嵌套的子布局里面的所有RadioButton)属于同一组。

2、增加方法setCheckWithoutNotif(int id),设置默认的RadioButton被选中,但是不响应监听事件。

Layout示例

<linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">

    <radiobutton android:layout_width="0dp" android:layout_height="50dp" android:layout_margin="3dp" android:layout_weight="1" android:background="@drawable/rdobtn_selecter" android:button="@null" android:gravity="center" android:text="10元" android:textsize="25sp"></radiobutton>

    <radiobutton android:layout_width="0dp" android:layout_height="50dp" android:layout_margin="3dp" android:layout_weight="1" android:background="@drawable/rdobtn_selecter" android:button="@null" android:gravity="center" android:text="20元" android:textsize="25sp"></radiobutton>

   ...
</linearlayout>

<linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">

    <radiobutton android:layout_width="0dp" android:layout_height="50dp" android:layout_margin="3dp" android:layout_weight="1" android:background="@drawable/rdobtn_selecter" android:button="@null" android:gravity="center" android:text="80元" android:textsize="25sp"></radiobutton>

   ...
</linearlayout>

</com.pheng.mutilradiogroup.myradiogroup>

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.