It shouldn't be too difficult. If you have a byte stream of the bitmap, then just set the pixels on the first/last row/col to black where you want to stretch the image and set the other pixels to zero. Then you could remain the image *.9.png and then load it as a normal 9 patch drawable resource.
There's more info on the 9-patch at this link<http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch>, so you can know which pixels you want to set as black and which to keep clear. Here's the big caveat: I've never done this programmatically, but I have drawn all my 9-patch images by hand in the GIMP setting the 9 patch pixels myself, so I don't think it'd be too hard to do in code. Nick -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en