Possible Duplicate:
Android: Scale a Drawable or background image?
I want to set a drawable (from resources) as background of my view. But I want to stretch it only horizontally. How can I do this?
Possible Duplicate:
Android: Scale a Drawable or background image?
I want to set a drawable (from resources) as background of my view. But I want to stretch it only horizontally. How can I do this?
There is no such scaleType that I can see. Have you tried this:
<ImageView android:id="@+id/imageView"
android:layout_width="fill_parent"
android:layout_height="100dp"
android:src="@drawable/image"
android:scaleType="fitXY">
</ImageView>
Then, you would need to place this in the background of another view, like making layers in a FrameLayout.
The best way is to use 9-patch . It's strechable graphic.
Here is description of tool to creating 9-patch graphic.