I create a shape drawable resource xml file for a create a background with two side curved corner.
Here I post my code of Shape drawable. But it not give me right result. It give me 4 side curved image.
So I just wanted to know how to create 2 side curved shape image.
Thanks
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#0579CD" />
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp" />
<padding
android:bottom="8dp"
android:left="8dp"
android:right="8dp"
android:top="8dp" />
Just pass the miner value to non-curve corner field. in your case:
<corners
android:bottomLeftRadius="0.1dp"
android:bottomRightRadius="0.1dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp" />
And one thing more. the preview are not show in graphical layout. You should try to see in device.
I hope this will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With