我们知道Button中有许多按钮的种类,下面介绍RadioButton和ToggleButton、Switch控件的使用方法。 一、RadioButton控件:单选按钮,一般用于选择性别之用。 1、首先设计view视图的样式。推荐先用视图模式再用代码模式编写。 <RadioGroup android:id="@+id/radioGroup1" android:layout_width="wrap_content" android:layout_height="wrap_content" ...
我们知道Button中有许多按钮的种类,下面介绍RadioButton和ToggleButton、Switch控件的使用方法。 一、RadioButton控件:单选按钮,一般用于选择性别之用。 1、首先设计view视图的样式。推荐先用视图模式再用代码模式编写。 <RadioGroup android:id="@+id/radioGroup1" android:layout_width="wrap_content" android:layout_height="wrap_content" ...