按钮和文字反色
来源:互联网 发布:networking 上传数据 编辑:程序博客网 时间:2024/05/16 11:39
<RadioGroup
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@id/biaoti_text"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="5dp"
android:background="#dcffffff">
<RadioButton
android:id="@+id/button_4sdian"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:button="@null"
android:checked="true"
android:background="@drawable/select_bk_color"
android:textColor="@drawable/select_text_color"
android:text="4S店"
android:textSize="20sp" />
<RadioButton
android:id="@+id/button_qicmeir"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:button="@null"
android:text="美容"
android:background="@drawable/select_bk_color"
android:textColor="@drawable/select_text_color"
android:textSize="20sp" />
<RadioButton
android:id="@+id/button_xiche"
android:button="@null"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="维修"
android:background="@drawable/select_bk_color"
android:textColor="@drawable/select_text_color"
android:textSize="20sp" />
</RadioGroup>
select_bk_color xml文件
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/color_bg_selected" android:state_checked="true"></item>
<item android:drawable="@color/color_bg_normal" android:state_checked="false"></item>
</selector>
select_text_color xml文件
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="#ffff"/>
<item android:state_checked="false" android:color="#157dfb"/>
</selector>
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@id/biaoti_text"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginTop="5dp"
android:background="#dcffffff">
<RadioButton
android:id="@+id/button_4sdian"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:button="@null"
android:checked="true"
android:background="@drawable/select_bk_color"
android:textColor="@drawable/select_text_color"
android:text="4S店"
android:textSize="20sp" />
<RadioButton
android:id="@+id/button_qicmeir"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:button="@null"
android:text="美容"
android:background="@drawable/select_bk_color"
android:textColor="@drawable/select_text_color"
android:textSize="20sp" />
<RadioButton
android:id="@+id/button_xiche"
android:button="@null"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:text="维修"
android:background="@drawable/select_bk_color"
android:textColor="@drawable/select_text_color"
android:textSize="20sp" />
</RadioGroup>
select_bk_color xml文件
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/color_bg_selected" android:state_checked="true"></item>
<item android:drawable="@color/color_bg_normal" android:state_checked="false"></item>
</selector>
select_text_color xml文件
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="#ffff"/>
<item android:state_checked="false" android:color="#157dfb"/>
</selector>
0 0
- 按钮和文字反色
- 自定义按钮(文字和图标)
- 生成彩色二维码(渐变色、插入图片和文字)2 反锯齿
- 鼠标浮在行之上时改行文字和背景反色
- 给工具栏按钮添加图标和文字
- UISearchBar 按钮的文字和颜色更改
- 按钮和文字点击后颜色变化
- 按钮图片和文字上下居中对齐
- 修改navigationController返回按钮颜色和文字
- 按钮上同时有文字和图片
- NavigationController返回按钮颜色和文字
- 自定义按钮图片和文字的位置
- jquery实现全选,反选,不选和提交按钮
- jquery 多个单选按钮的全选和反选
- 按钮文字选中与点击变动色
- HTML全选和反选的按钮代码,还是感觉这种按钮爽!
- 动态设置按钮上的文字和图片
- Android中的ListView实现图片文字和按钮
- 程序题
- 在Android Studio中进行单元测试和UI测试
- #扫疑贴#ip地址、子网掩码、网关等概念
- Debian比较快的源
- jquery ajax error函数和及其参数详细说明
- 按钮和文字反色
- 数据泵的理解细节使用
- CCF 201609-2 火车购票
- notepad++ 的"进化"之路(emmet、expoler、jstool)
- 88. Merge Sorted Array (合并有序数组)
- github clone 分支的命令
- IE6不支持opacity半透明 BUG的解决方法
- JSP基础知识总结
- Python 中copy与deepcopy的比较