If the radius of curved corners stays the same, you can use a single 9patch object. If the radius should scale with the rectangle, then you need to draw it on DrawingCanvas, or compose of several sprites, or maybe draw with JS somehow.
I hate spriting and I would prefer code. :D
I love spriting, spriting is great! :)