Android的资源文件下创建相应的文件名,记住设置文件后缀必须为XML <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#fe5858" android:endColor="#fe7349" /> <corners android:radius="4dp"/> </shape>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#fe5858"
android:endColor="#fe7349" />
<corners android:radius="4dp"/>
</shape>