I recently heard about 9-patch images. I know its 9 tiled and is stretchable. I\'d like to know more about it.
How can I create a 9-patch image?
Is th
Most of the examples talk about creating a 9-patch image, but implementation details are usually left at a high level.
Nick's post above - with the good 9-patch tutorial that provides a working project download file , saved the day.
Here are the main implementation details that worked for me (once you have a 9-patch image ready to go):
Reference the drawable with the name but don't include .9.png (auto-complete in eclipse will take care of this)
Make sure you only have 1 image under the main /drawable folder (not a version for each dpi folder)
The image must be specified using :background, not :src (this got me stuck for a while)
android:background="@drawable/splash_logo"
Make sure the image and layout that contains it are using:
android:layout_width="fill_parent"
android:layout_height="fill_parent"