Android shape图形

  1. 画一条虚线


//虚线的宽度

作为背景资源添加到控件中,还需要设置这样一句话:`Android:layerType=”software”`
stroke:描边
android:width="2dp" 描边的宽度,android:color 描边的颜色。
我们还可以把描边弄成虚线的形式,设置方式为:
android:dashWidth="5dp" 
android:dashGap="3dp"
其中android:dashWidth表示'-'这样一个横线的宽度,android:dashGap表示之间隔开的距离

你可能感兴趣的:(Android shape图形)