Android中的shape
2016-09-25 15:52
190 查看
调用方法:android:background="@drawable/shape"
solid:实心,就是填充的意思
gradient:渐变
android:angle是渐变角度,必须为45的整数倍。左边是零度。
可以指定渐变为径向渐变,android:type="radial",径向渐变需要指定半径android:gradientradius="50"。
stroke:描边
android:width="2dp" 描边的宽度,android:color 描边的颜色。
还可以把描边弄成虚线的形式,设置方式为:
android:dashwidth="5dp"
android:dashgap="3dp"
其中android:dashwidth表示'-'这样一个横线的宽度,
android:dashgap表示之间隔开的距离。
solid:实心,就是填充的意思
gradient:渐变
android:angle是渐变角度,必须为45的整数倍。左边是零度。
可以指定渐变为径向渐变,android:type="radial",径向渐变需要指定半径android:gradientradius="50"。
stroke:描边
android:width="2dp" 描边的宽度,android:color 描边的颜色。
还可以把描边弄成虚线的形式,设置方式为:
android:dashwidth="5dp"
android:dashgap="3dp"
其中android:dashwidth表示'-'这样一个横线的宽度,
android:dashgap表示之间隔开的距离。
相关文章推荐
- Android中shape的使用
- android画图-----shape的使用文档信息
- 1. android 背景渐变色(shape,gradient)
- android:shape的使用
- android通过shape.xml制作渐变背景
- Android Selector 与 Shape 基本用法
- Android自定义Shape
- android:shape的使用
- Android中shape的使用
- Android控件美化Shape你会用吗?
- Android控件美化Shape
- 【转载】Android 怎么样使用shape
- android:shape
- android中shape布局详解
- android背景颜色渐变及改变title颜色 shape
- Android下基于XML的Graphics shape使用方法
- Android控件美化Shape你会用吗?
- (转)android:shape的使用
- Android中shape的使用大全
- Android下基于XML的Graphics shape的高级UI设计,定义圆角背景等