Search code examples
androiduser-interfacenine-patch

Android 9-Patch Background Image Initial PNG Size?


I'm looking at making a 9-Patch background image for my application and I'm wondering what size should I make the initial PNG in Photoshop before I convert it to a 9-Patch Image?

Thanks Aaron


Solution

  • Take a look at http://developer.android.com/guide/practices/screens_support.html

    Note the combination of screen sizes and densities to consider.

    For now, you'll probably want to cover at least three image sizes: 320x480, 480x800, and something for small/LDPI devices. In the not-too-distant future, you might also want to include an image for XHDPI devices.

    The images should be these sizes, before adding the 9-patch info. The 9-patch info will make the actual image sizes larger by 2 pixels in width and height, and that's how it's supposed to work. So, the 320x480 image will become 322x482.