xml文件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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="40dp"
android:background="@drawable/navtop_red" >
<Button
android:id="@+id/txt_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@null"
android:gravity="center"
android:onClick="finish"
android:text="返回"
android:textColor="#ffffff"
android:textSize="15sp" />
<TextView
android:id="@+id/textView1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="选择区域"
android:textColor="#ffffff"
android:textSize="@dimen/loushi_main" />
<Button
android:id="@+id/btn_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:background="@null"
android:gravity="center"
android:onClick="ok"
android:te

本文详细介绍了如何在Android开发中利用RadioGroup实现多行多列的单选效果,通过XML布局和Java代码的配合,解决在RadioGroup中排列选项的问题。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



