<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <stroke android:width="1dp" android:color="#ff0000" android:dashGap="3dp" android:dashWidth="5dp" /> </shape>
其中,
width代表线宽
dashGap 代表线与线之间的距离
dashWidth 代表一个小线段的长度。