andrid 样式 shape.xml 笔记
来源:互联网 发布:程序员的算法趣题pdf 编辑:程序博客网 时间:2024/06/05 00:58
main.xml:<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TestShapeButton" android:background="@drawable/button_selector" />button_selector.xml:<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" > <shape> <!-- 渐变 --> <gradient android:startColor="#ff8c00" android:endColor="#FFFFFF" android:type="radial" android:gradientRadius="50" /> <!-- 描边 --> <stroke android:width="2dp" android:color="#dcdcdc" android:dashWidth="5dp" android:dashGap="3dp" /> <!-- 圆角 --> <corners android:radius="2dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item android:state_focused="true" > <shape> <gradient android:startColor="#ffc2b7" android:endColor="#ffc2b7" android:angle="270" /> <stroke android:width="2dp" android:color="#dcdcdc" /> <corners android:radius="2dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item> <item> <shape> <solid android:color="#ff9d77"/> <stroke android:width="2dp" android:color="#fad3cf" /> <corners android:topRightRadius="5dp" android:bottomLeftRadius="5dp" android:topLeftRadius="0dp" android:bottomRightRadius="0dp" /> <padding android:left="10dp" android:top="10dp" android:right="10dp" android:bottom="10dp" /> </shape> </item></selector>
0 0
- andrid 样式 shape.xml 笔记
- Android开发学习笔记:利用drawable中xml文件编写自定义控件样式(shape)
- Andrid xml解析
- Shape 样式
- shape样式
- andrid listview修改分割线样式
- andrid
- shape .xml
- andrid定义Button的样式和选中样式
- Shape Drawable样式
- Android shape样式
- Android样式之Shape
- Android样式之Shape
- Android样式开发---shape
- 【样式】shape属性详细
- Android样式开发 Shape
- 安卓学习笔记---Android样式的开发:Shape篇以及一系列样式的开发
- [Android进阶笔记]XML相关——Selector、Shape、Styles
- Android OpenGL ES教程 第二部分 构建多边形
- 无损分区工具—Acronis Disk Director
- 源码安装openldap2.3以前版本
- windows 如何设置环境变量
- 动态sql之我见(字段名动态生成)
- andrid 样式 shape.xml 笔记
- dedecms根据字符串个数 截取字符串
- IcePHP框架中的快速后台中的通用CRUD功能框架(十) 运行效果图
- Tuning Mysql Server Parameters
- 转:DB2中实现Oracle的功能
- Spring Security教程(9)---- 自定义AccessDeniedHandler
- 自己用
- HTML5画布转换状态栈教程
- 快速计算星期几,就是最强大脑