android- how to make a shape drawable

235 Views Asked by At

I want to make a drawable like this : enter image description here

this is my code so far:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <corners android:topLeftRadius="10dp"
                android:topRightRadius="5dp"
                android:bottomLeftRadius="15dp"
                android:bottomRightRadius="20dp" />
            <solid android:color="@color/red_home" />

        </shape>
    </item>
    <item>
        <shape android:shape="rectangle" >
            <corners android:topLeftRadius="100dp"
                android:topRightRadius="0dp"
                android:bottomLeftRadius="0dp"
                android:bottomRightRadius="0dp" />
            <solid android:color="@color/green2" />
        </shape>
    </item>
</layer-list>

enter image description here

It's not how I wanted it to be ... I don't want the radius in the top left corner... how can I make it like the first image ?

0

There are 0 best solutions below