I want to have an ImageView with top right corner & bottom left corner rounded.
<corners android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:topLeftRadius="0dp" android:bottomRightRadius="0dp"/>
Tried the above code , but it's not working.Please help!
In the upper left corner, select “Draw Filled Shape“. Draw the rounded rectangle over the area you would like to keep for your rounded corners image. Use the Magic Wand to select the area of the rounded rectangle. Select “Edit” > “Invert Selection“.
Using clickable imagesYou can turn any View , such as an ImageView , into a button by adding the android:onClick attribute in the XML layout. The image for the ImageView must already be stored in the drawable folder of your project.
I am using this it works fine for me
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<solid android:color="#FFFFFF" />
<corners
android:bottomLeftRadius="10dp"
android:bottomRightRadius="10dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
<stroke
android:width="1dp"
android:color="#000000" />
</shape>
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