drawble文件夹下面新建,xxx.xml内容如下
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="200"
android:centerColor="#EBFDEF"
android:endColor="#EBFDEF"
android:startColor="#A3FCB5" />
<corners android:radius="30dp" />
</shape>
效果如下图
如果说,我只要下面两个是圆角,这样就可以
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="200"
android:centerColor="#EBFDEF"
android:endColor="#EBFDEF"
android:startColor="#A3FCB5" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="20dp"
android:bottomLeftRadius="20dp"
/>
</shape>