Android RadioButton的基本使用
一、 说明
本文主要讲一下Android 的RadioButton的基本知识。
二、 所用工具
Android Studio
三、 具体内容
1. RadioButton
单选按钮,需要放在RadioGroup中实现单选
2. 应用场景
选择性别
3. 例子
Xml代码:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_w