Android中自定义checkbox样式
来源:互联网 发布:js 上传图片 编辑:程序博客网 时间:2024/05/01 21:07
http://blog.csdn.net/zuolongsnail/article/details/7106586
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样式
- Qt4过渡至Qt5
- 使用Xcode 6将你的项目本地化
- 第10周项目1-程序填充与阅读
- 关于如何使用Unity的Camera(3)
- FlexViewer 框架更改比例尺(创建比例尺)
- Android中自定义checkbox样式
- 第九周项目四之乘法口诀表
- 第十周 项目一:程序填充与阅读(1)
- 群翔ShopNum1分销系统V8.1升级版,更优更全更盈利
- 第十周项目1:程序填充与阅读的拓展题目
- Linux下线程概述
- mysql配置ODBC数据源连水晶报表CrystalReport.rpt
- C# - CLR
- 融合通信