Android中自定义checkbox样式
来源:互联网 发布:淘宝店全球购是真的吗 编辑:程序博客网 时间:2024/05/22 12:33
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
- 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样式
- DP:segment string
- 7种不靠广告赚钱的App生钱之道
- css display设置成block和空值
- 图文详解YUV420数据格式
- cscope使用命令
- Android中自定义checkbox样式
- Bootstrap 使用
- Struts2漏洞解读:官方惹祸 黑客攻防
- cocos2d-x 类大全及其概要
- 人人都能用的10条网站易用性技巧
- 各种排序比较
- 一个向量的最大子序列
- SqlServer2008基础知识:安全与权限
- 微软上演木马屠城记,收购诺基亚设备和服务部门