Android(安卓)自定义RadioButton样式 RadioGroup横向排列并分行
16lz
2021-12-04
先上效果图,图中五个RadioButton为一组RadioGroup
一、采用的整体布局
注意TableLayout和RadioGroup的层级关系,反过来是不可行的
二、TableRow设置横向居中
三、RadioButton属性
android:layout_width="60dp"android:layout_height="60dp"android:layout_weight="1"android:layout_marginLeft="8dp"android:layout_marginRight="8dp"android:button="@null"android:background="@drawable/theme1_select"
四、RadioButton选中效果
theme1_select.xml文件
<?xml version="1.0" encoding="utf-8"?>
更多相关文章
- 【转】Android中gravity与layout_gravity的区别
- gravity 和 layout_grativy 区别
- 设置TextView文字居中
- android 相对定位布局方向 RelativeLayout
- ImageView下载图片加载
- Android(安卓)RelativeLayout相对布局属性简析
- android将EditText设置为只可点击 不弹出软键盘不显示光标
- Android(安卓)Studio点击按钮更换背景图片
- android中ImageView、ImageButton、Button之间的区别