shape的使用
2015-12-04 13:55
183 查看
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 圆角
android:topLeftRadius左上角圆角
android:topRightRadius 右上角圆角
android:bottomLeftRadius 左下角圆角
android:bottomRightRadius 右下角圆角
--><cornersandroid:radius="9dp"android:topLeftRadius="2dp"android:topRightRadius="2dp"android:bottomLeftRadius="2dp"android:bottomRightRadius="2dp"/><!-- 设置圆角半径 --><!-- 渐变 --><gradientandroid: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"/><!-- 间隔 --><paddingandroid:left="2dp"android:top="2dp"android:right="2dp"android:bottom="2dp"/><!-- 各方向的间隔 --><!-- 大小 --><sizeandroid:width="50dp"android:height="50dp"/><!-- 宽度和高度 --><!-- 填充 --><solidandroid:color="@android:color/white"/><!-- 填充的颜色 --><!-- 描边
width 边的宽度
color 边的颜色
dashWidth 设置虚线的宽度 dashGap 设置虚线的间隔宽度
--><strokeandroid:width="2dp"android:color="@android:color/black"android:dashWidth="1dp"android:dashGap="2dp"/></shape>
相关文章推荐
- Android中的Shape和Selector的结合使用实例
- Android编程使用自定义shape实现shadow阴影效果的方法
- Android Selector和Shape的使用方法
- CreateJs系列教程之 EaselJs_3_绘制移动矩形(Shape)
- android之shape使用
- android:shape的使用
- shape 渐变!描边!圆角!漂亮的自定义背景
- Android shape属性介绍
- android shape 的属性
- WPF学习(一)绘制图形的三种方法及区别
- WPF学习(一)绘制图形的三种方法及区别
- Android 编程下 shape 绘制图形
- android shape的使用
- 安卓控件增加自定义点击效果
- Android 如何使用shape绘制只有一个圆角的矩形
- EXCEL数据根据XY坐标导入ArcGIS
- Android Shape详解
- Android开发之Shape自定义圆角按钮
- Drawable资源之shape drawable
- android中shape的用法