自定义checkbox,自定义button
2015-10-29 13:36
239 查看
<style name="custom_checkbox" parent="@android:style/Widget.CompoundButton.CheckBox"> <item name="android:button">@drawable/comfirm_selector</item> </style>
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/icon_comfirm_normal" android:state_checked="true"/> <item android:drawable="@drawable/icon_confirm" android:state_checked="false"/> <item android:drawable="@drawable/icon_comfirm_normal"/></selector>
<CheckBox android:layout_alignParentRight="true" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/custom_checkbox" android:id="@+id/button_yes" android:checked="true" />
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/button_his" android:background="@drawable/his_selector" />
//图片选择的背景
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/his_nor" android:state_pressed="false"></item> <item android:drawable="@drawable/his_press" android:state_pressed="true"></item> <item android:drawable="@drawable/his_nor" android:state_window_focused="false"></item></selector>
颜色选择的背景
相关文章推荐
- <学习笔记>ArcGIS Runtime for Android 10.2.5配置+baseMap
- Swing事件分发线程
- 2015年10月26日作业
- java 获取系统时间
- 解决CocoaPods在OS X 10.11上出现的问题
- Linux 技巧:让进程在后台可靠运行的几种方法
- oracle存储过程常用技巧
- Leetcode Container With Most Water
- Tomcat Disable Session
- 个人笔记 css 01 开启chrome浏览器GPU加速模式
- ListView 嵌套 GridView 大法
- 增加略过超链接的上面图片一起变色
- Android AlarmManager实现不间断轮询服务
- KVC
- 泛型
- django json http://blog.csdn.net/eengel/article/details/6198585...http://www.yihaomen.com/article/python/279.htm
- poi API大全
- 安卓——安卓开发学习资料整理
- linux下查找某个文件位置的方法
- 个人笔记 html 02 手机网页固定宽度不被放大缩小