自定义checkbox,自定义button
来源:互联网 发布:python数据处理 下载 编辑:程序博客网 时间:2024/04/29 08:39
<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>颜色选择的背景
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
selector
xmlns:android
=
"http://schemas.android.com/apk/res/android"
>
<
item
android:state_pressed
=
"true"
android:drawable
=
"@android:color/white"
/>
<!-- pressed -->
<
item
android:drawable
=
"@android:color/black"
/>
<!-- default -->
</
selector
>
0 0
- 自定义checkbox,自定义button
- 自定义button
- 自定义BUTTON!
- 自定义button
- 自定义Button
- 自定义button
- 自定义button
- 自定义Button
- 自定义Button
- 自定义Button
- 自定义button
- 自定义CheckBox
- 自定义checkBox
- 自定义CheckBox
- 自定义checkbox
- 自定义CheckBox
- 自定义checkbox
- 自定义checkbox
- Leetcode Container With Most Water
- Linux中使用diff生成的补丁格式说明
- java 获取系统时间
- 远程桌面不能复制粘贴解决办法
- 个人笔记 html 03 制作返回页面顶部top
- 自定义checkbox,自定义button
- 解决CocoaPods在OS X 10.11上出现的问题
- Android 5.0以后版本打开“有权查看使用情况的应用”
- <学习笔记>ArcGIS Runtime for Android 10.2.5配置+baseMap
- 字符串问题归类--C和C++
- sqlserver 查询效率优化
- 使用CreateFile()打开COM10及以上串行口
- linux下vi编辑器命令大全
- 使用WakeLock使Android应用程序保持后台唤醒