Android中shape的使用
来源:互联网 发布:java oracle数据库连接 编辑:程序博客网 时间:2024/06/05 16:00
1、padding: 间隔,各个方向的间隔
android:left="2dp"
android:top="2dp"
android:right="2dp"
android:bottom="2dp"
2、corners:圆角
android:radius为角的弧度,值越大角越圆。
我们还可以把四个角设定成不同的角度,方法为:
<corners
android:topRightRadius="20dp" 右上角
android:bottomLeftRadius="20dp" 右下角
android:topLeftRadius="1dp" 左上角
android:bottomRightRadius="0dp" 左下角
3、gradient:渐变
android:startColor和android:endColor分别为起始和结束颜色,ndroid:angle是渐变角度,必须为45的整数倍。
另外渐变默认的模式为android:type="linear",即线性渐变,可以指定渐变为径向渐变,android:type="radial",径向渐变需要指定半径android:gradientRadius="50"。
android:left="2dp"
android:top="2dp"
android:right="2dp"
android:bottom="2dp"
2、corners:圆角
android:radius为角的弧度,值越大角越圆。
我们还可以把四个角设定成不同的角度,方法为:
<corners
android:topRightRadius="20dp" 右上角
android:bottomLeftRadius="20dp" 右下角
android:topLeftRadius="1dp" 左上角
android:bottomRightRadius="0dp" 左下角
3、gradient:渐变
android:startColor和android:endColor分别为起始和结束颜色,ndroid:angle是渐变角度,必须为45的整数倍。
另外渐变默认的模式为android:type="linear",即线性渐变,可以指定渐变为径向渐变,android:type="radial",径向渐变需要指定半径android:gradientRadius="50"。
4、solid:实心,就是填充的意思
android:color指定填充的颜色
5、stroke:描边
android:width="2dp" 描边的宽度,android:color 描边的颜色。
我们还可以把描边弄成虚线的形式,设置方式为:
android:dashWidth="5dp"
android:dashGap="3dp"
其中android:dashWidth表示'-'这样一个横线的宽度,android:dashGap表示之间隔开的距离。
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的使用
- Debug Print
- 因为发现对象名称 'dbo.T3' 和索引名称 'PK__T3__3214EC2706CC942B' 有重复的键,所以 CREATE UNIQUE INDEX 语句终止。重复的键值为 (1)。
- jsp页面传到后台的参数为乱码
- ios-day10-01(模仿点菜系统。UIPickerView的使用、如何产生随机数等)
- strlen,wcslen,lstrlen,sizeof及wstring
- Android中shape的使用
- [Android疑难杂症]动态改变Background后Padding无效的问题
- 最大连续子序列和 分治思想和动态规划思想
- Python 学习(第一部分) Q&A对话
- IntelliJ IDEA 14.x 与 Tomcat 集成,创建并运行Java Web项目
- Cookie介绍及JavaScript操作Cookie方法详解
- Android 文件关联
- Multivision面试材料准备学习之HTML
- Spring MVC使用Quartz定时执行