我需要使用shape xml在Android中制作这个形状。
该形状需要呈矩形,但在左上角和右上角具有圆角,而底部角落保持不变。
我尝试了以下代码,但无效:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<corners
android:topLeftRadius="10dp"
android:topRightRadius="10dp"
/>
<gradient
android:angle="270"
android:endColor="@color/Red"
android:startColor="@color/Red"
android:type="linear" />
</shape>