Android中自定义checkbox样式
来源:互联网 发布:姚明nba生涯场均数据 编辑:程序博客网 时间:2024/05/22 17:07
1.首先在drawable文件夹中添加drawable文件checkbox_style.xml。
- <?xml version="1.0" encoding="utf-8"?>
- <selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/checkbox_pressed" android:state_checked="true"/>
- <item android:drawable="@drawable/checkbox_normal" android:state_checked="false"/>
- <item android:drawable="@drawable/checkbox_normal"/>
- </selector>
- <style name="CustomCheckboxTheme" parent="@android:style/Widget.CompoundButton.CheckBox">
- <item name="android:button">@drawable/checkbox_style</item>
- </style>
- <CheckBox
- android:id="@+id/select_all"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- style="@style/CustomCheckboxTheme" />
使用到的图片资源
checkbox_normal.png
checkbox_pressed.png
0 0
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- android中checkbox自定义样式
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- Android中自定义CheckBox样式
- Android中自定义CheckBox样式
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- android中checkbox自定义样式
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- android中CheckBox自定义样式
- Android中自定义checkbox样式
- Android中自定义checkbox样式
- 【LeetCode】Decode Ways
- 漫说代理模式---给宝宝成长护航
- 在Eclipse中创建Maven多模块工程的例子[转载]
- staxon 实现 json 与xml 之间的转换 支持数组,属性
- 中文首字母 排序
- Android中自定义checkbox样式
- XMLHttpRequest cannot load 跨域问题解决
- [AI]模拟退火解决TSP问题(含源码)
- JSTL与EL表达式(为空判断)
- 协同过滤算法介绍
- 获取java项目根目录
- jquery关于val,attr的一点总结
- Android Latout属性
- 3D虚拟展示是商家展示商品时的不二之选.