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 Ph开发者_开发问答otoshop before I convert it to a 9-Patch Image?
Thanks Aaron
Your image can be as small as 5 by 5 to as large as 1280x800...
It really depends what you want to show on that background image. small files are certainly not as exciting as nice fullscreen splash screens designed by a professional :)
If you want your splash screen to fill the screen, you can design your splash screen so it fits the biggest screen out there and put it inside an imageview letting android crop it for smaller screen.
You can also scale the image to fit all resolutions, but this is not as sharp looking.
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.
I guess that all depends on what you want from the image. Ensure that the image has everything that you need in it before converting it, obviously. Perhaps I'm misunderstanding your question.
精彩评论