Wednesday, 11 September 2013

How can I set a background image with rounded corners

How can I set a background image with rounded corners

I want to create a background that is an image and also give it rounded
corners. I have the following code. the background image shows but there
is no rounded corners.
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<corners android:radius="20dp" />
</shape>
</item>
<item>
<bitmap
android:src="@drawable/tabs_pattern_diagonal"
android:tileMode="repeat" />
</item>
</layer-list>
I have tried changing the order of the times but it made no difference

No comments:

Post a Comment