RadioButton背景色选择器和文字的选择器
来源:互联网 发布:世界历史数据库 编辑:程序博客网 时间:2024/06/05 10:51
<RadioGroup android:id="@+id/rg" android:layout_width="match_parent" android:layout_height="128dp" android:layout_gravity="center_vertical|center" android:orientation="horizontal"> <RadioButton android:id="@+id/rb_line1" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:background="@drawable/rb_selector_title" android:button="@null" android:checked="true" android:gravity="center" android:text="线路一" android:textColor="@drawable/rb_color_text3" android:textSize="30px" /> <RadioButton android:id="@+id/rb_line2" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:background="@drawable/rb_selector_title" android:button="@null" android:gravity="center" android:text="线路二" android:textColor="@drawable/rb_color_text3" android:textSize="30px" /></RadioGroup>
文字选择器<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:color="#c40d23"/> <item android:state_checked="false" android:color="#666666"/></selector>背景选择器<?xml version="1.0" encoding="utf-8" ?><selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:drawable="@drawable/shape_tab_border3" android:state_checked="true" /> <item android:drawable="#FFFFFF" /></selector>使用selector画背景图
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 连框颜色值 --> <item> <shape> <solid android:color="#c40d23" /> </shape> </item> <!-- 主体背景颜色值 --> <item android:bottom="4dp"> <!--设置只有底部有边框--> <shape> <solid android:color="#ffffff" /> </shape> </item></layer-list>效果图
阅读全文
0 0
- RadioButton背景色选择器和文字的选择器
- 如何设置文字的前景色和背景色
- 设置文字的前景色和背景色
- android中RadioButton的选择器
- 如何设置richedit的默认背景色和文字颜色
- 永久设置SecureCRT的背景色和文字颜色方案
- 安卓修改背景色和文字的颜色
- 修改ActionMenu的背景色和文字颜色
- iOS[试试] - 修改状态栏的文字颜色和背景色
- html,button的背景色和文字颜色
- java代码设置Burron、Radiobutton的背景色和字体颜色
- LaTeX技巧005:改变文字的前景色和背景色
- 去掉桌面图标文字的背景色
- 不伤眼睛的文字背景色
- 不伤眼睛的文字背景色
- 不伤眼睛的文字背景色
- RadioButton文字前面那个圆圈也可以使用颜色选择器
- RadioButton背景选择器的那些坑~
- Android JNI之静态注册(android studio)
- MesaSQLite 注册码
- object file (xx.a(xx.o)) was built for newer iOS version (10.3) than being linked (10.2)
- 机器学习【周志华】课后习题2.5证明
- 算法竞赛入门经典-习题3-2 分子量(Molar Mass, ACM/ICPC Seoul 2007, UVa1586)
- RadioButton背景色选择器和文字的选择器
- Android JNI之动态注册(android studio)
- Glide使用造成OOM解决方案
- Hystrix使用入门手册(中文)
- [练习] LCA练习1(最基础)
- 归并排序
- 解决css3动画效果在360兼容模式跟猎豹浏览器下不兼容
- SQL存储过程的优点、创建、互相调用与调试
- FMS4.5/AMS5重置管理员密码方法