I want to add a custom image as android button background with shaping it in rounded rectangle. I am trying as following.
This is my xml file that I am setting as background to button.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn">
<shape android:shape="rectangle">
<corners android:radius="30dp"/>
</shape>
</item>
I want the "btn" image as background of the button and I want the shape of button as rounded rectangle. But as I set the image, the shape is remaining in full rectangular format same as that of image. Please suggest any necessary improvements.
Thank you.