<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:andro会报错。
android:centerX 渐变中心X点坐标的相对位置
android:centerY 渐变中心Y点坐标的相对位置
4、stroke
描述: stroke:描边 相当于html中的盒子模型的border
属性:
android:width 描边的宽度
android:color 描边的颜色
android:dashWidth 表示描边的样式是虚线的宽度,
值为0时,表示为实线。值大于0则为虚线。
android:dashGap 表示描边为虚线时,虚线之间的间隔 即“ - - - - ”
5、corners
描述: corners: 圆角
属性:
android:radius 半径
android:topLeftRadius 左上角半径
android:topRightRadius 右上角半径
注意一下两个属性比较不同:
android:bottomLeftRadius 右下角半径
android:bottomRightRadius 左下角半径
6、padding
描述:内部边距,即内容与边的距离
属性:
android:left 左内边距
android:top 上内边距
android:right 右内边距
android:bottom 下内边距
-->
相关文章: