先看一下效果:
在drawable中写shape.xml文件
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <solid android:color="#00FFFFFF" /> </shape> </item> <item android:left="-20dp" android:right="-20dp" android:top="-50dp"> <shape android:shape="oval" android:useLevel="true"> <solid android:color="弧形背景的颜色值" /> <size android:height="120dp" /> </shape> </item> </layer-list>