Android中自定义checkbox样式
来源:互联网 发布:云计算阅读题答案 编辑:程序博客网 时间:2024/05/16 04:26
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样式
- JNI/NDK开发指南(四)--访问数组(基本类型数组与对象数)
- 数据库学习记录--通信协议
- linux shell中重定向 1>&2 2>&1
- Codeforce 705D 贪心选择
- 多线程队列的算法优化(二)
- Android中自定义checkbox样式
- struts2 s:if标签以及 #,%{},%{#}的使用方法等在资料整理
- unity心形线函数
- python操作Excel读写--使用xlrd
- 今天的精彩看点,你错过了吗?
- java中Socket相互通信
- 无法访问scalr
- 数据结构课设--5药店的药品销售统计系统(排序应用)
- 选择排序