Working with NinePatch Stretchable Graphics in Android
Jun 25, 2010, 01:33 (0 Talkback[s])
(Other stories by Shane Conder Lauren Darcey)
How to Help Your Business Become an AI Early Adopter
"Android devices come in many shapes and sizes, often making it
very difficult for developers to design applications that look
great on all the various screen sizes and orientations. For
addressing this challenge, NinePatch graphics can be indispensable.
In this article, we discuss what the NinePatch graphics format is,
how it works, and when to use it.
"What Is NinePatch?
"Android supports NinePatch Stretchable Graphics for the
controlled scaling of images. NinePatch graphics are simply PNG
graphics that have patches, or regions of the image, defined to
scale and stretch in the appropriate areas instead of scaling the
entire image as one unit, which often obscures the details of the
graphic. Generally, the center patch is transparent or solid, with
parts of the edges set to remain fixed, other edge parts set to
stretch, and the corners set to remain fixed."