The best way is to create a rounded corener button with a background that has a repeating bitmap.
2 answers
Thank you for your suggestions but they don't work :( I ended up doing the inevitable and creating a custom view where I imported the GradientDrawable from my resources where I defined rounded corners etc. and then I also imported mine " texture "as a BitmapDrawable and used by PorterDuffXfermode to mask it. It would be nice to create a shape and then apply to that shape :(.
+1
source to share
For rounded corners, check this:
http://nishantvnair.wordpress.com/2010/11/09/customize-button-in-android/
to add an image background, just add it to the resource
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" android:padding="10dp">
<corners android:bottomRightRadius="30dp"
android:bottomLeftRadius="30dp"
android:topLeftRadius="30dp"
android:topRightRadius="30dp" />
</shape>
</item>
<item>
<bitmap android:src="@drawable/yourfilename"
android:tileMode="repeat" />
</item>
</layer-list>
+1
source to share