Android studio新建一个项目,修改XML如下;
其中Activit名称如下:MyControlRadioCheckBox
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context=".MyControlRadioCheckBox">
<!-- RadioGroup:单选分组-->
<!-- orientation:方向-->