Android <shape />的使用
来源:互联网 发布:玲珑加速器mac怎么样 编辑:程序博客网 时间:2024/05/22 14:04
shape用于设定形状,可以在selector,layout等里面使用,有6个子标签,各属性如下:
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 圆角 --> <corners android:radius="9dp" android:topLeftRadius="2dp" android:topRightRadius="2dp" android:bottomLeftRadius="2dp" android:bottomRightRadius="2dp"/><!-- 设置圆角半径 --> <!-- 渐变 --> <gradient android:startColor="@android:color/white" android:centerColor="@android:color/black" android:endColor="@android:color/black" android:useLevel="true" android:angle="45" android:type="radial" android:centerX="0" android:centerY="0" android:gradientRadius="90"/> <!-- 间隔 --> <padding android:left="2dp" android:top="2dp" android:right="2dp" android:bottom="2dp"/><!-- 各方向的间隔 --> <!-- 大小 --> <size android:width="50dp" android:height="50dp"/><!-- 宽度和高度 --> <!-- 填充 --> <solid android:color="@android:color/white"/><!-- 填充的颜色 --> <!-- 描边 --> <stroke android:width="2dp" android:color="@android:color/black" android:dashWidth="1dp" android:dashGap="2dp"/></shape>
0 0
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- iOS开发--根据label内容动态设定label大小
- 链表的反转
- TCP/IP、Http、Socket的区别
- python读取mnist
- 第一行代码-13.3 定制自己的日志工具
- Android <shape />的使用
- 设计模式(5)——建造者模式(Builder Pattern)
- 虚函数 纯虚函数 抽象类
- 使用poi来解析Excel的xls和xlsx
- React-DOM操作详解
- dict中的“深拷贝”和“浅拷贝”
- iOS- "unacceptable content-type: text/plain"等content-type bug解决方案
- win7上使用eclipse阅读hadoop源码准备
- ABP总体介绍