畫圓環代碼如下:
畫圓環,外邊的邊界寬度大一點即可:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval"
android:useLevel="false" >
<solid android:color="@color/deliveryTop" />
<stroke
android:width="3dp" //值越大,里面圓越小
android:color="@color/deliveryBottom" />
<size
android:height="15dp"
android:width="15dp" />
</shape>
畫矩形,代碼如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/dark_blue" />
<stroke
android:width="2px"
android:color="#ffffff" />
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
</shape>
