觉得画来玩玩,比较有趣,记录一下。
1格子。
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape>
<solid android:color="@color/white"/>
</shape>
</item>
<item android:bottom="-600dp"
android:right="-600dp"
android:left="-600dp">
<shape>
<!-- 破折线的宽度为dashWith,破折线之间的空隙的宽度为dashGap,当dashGap=0dp时,为实线-->
<stroke
android:width="600dp"
android:color="@color/black"
android:dashWidth="3dp"
android:dashGap="3dp" />
</shape>
</item>
<item android:bottom="-600dp"
android:right="-600dp"
android:top="-600dp">
<shape>
<stroke
android:width="600dp"
android:color="@color/black"
android:dashWidth="3dp"
android:dashGap="3dp" />
</shape>
</item>
</layer-list>
2.圆形
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke android:width="250dp"
android:color="@color/white"
android:dashWidth="2dp"
android:dashGap="2dp"/>
</shape>