在网上观察下来,好像画半圆的资料没有,所以这边提供一个画半圆的关于shape的xml文件。
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape = "rectangle" > <size android:height="40dp" android:width="80dp"/> <solid android:color = "#f74b4b" /> <corners android:bottomLeftRadius = "0dp" android:bottomRightRadius = "0dp" android:topLeftRadius = "60dp" android:topRightRadius = "60dp"/> </shape>