I use the code below to round the corners of a RelativeLayout. I save this as mybackground.xml in the drawable folder.
It works great for rounding a corner, but the problem is that I also want to add a transparent image as the background of my RelativeLayout. How can I achieve both things? How can I use image and drawn xml (to round a corner) at the same time for RelativeLayout ...
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp"> <corners android:bottomRightRadius="30dp" android:bottomLeftRadius="30dp" android:topLeftRadius="30dp" android:topRightRadius="30dp" /> </shape>
aftab source share