Giter Site home page Giter Site logo

chenjuyu / android_radiogroup_mutilradiogroup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pheng/android_radiogroup_mutilradiogroup

0.0 1.0 0.0 2.56 MB

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

Java 100.00%

android_radiogroup_mutilradiogroup's Introduction

android MutilRadioGroup

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

###根据RadioGroup源码修改而来,实现支持RadioGroup里面的RadioButton嵌套在其他布局里,从而实现复杂布局的单选框功能。 使用的时候只用把MyRadioGroup类拷到自己的工程里就可以引用。

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

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

###Layout示例 <com.pheng.mutilradiogroup.MyRadioGroup android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" >

    <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
            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" />

       ...
    </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" />

       ...
    </LinearLayout>
</com.pheng.mutilradiogroup.MyRadioGroup>

android_radiogroup_mutilradiogroup's People

Contributors

pheng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.