.9.png's
What are .9.png's and how do i edit them??
.9's are very simple to use, it's when they are created incorrectly they become a pain in the arse.
.9.pngs use a 1 pixel BLACK (000000) border to determine its characteristics and how it behaves.
I used green and red for display purposes!!.
WHENEVER EDITING .9.PNG'S ALWAYS ENSURE THE BORDERS ARE NOT COMPRIMISED AND MUST BE A SOLID BLACK, RGB CODE= 000000
You can use a graphics editor to create these borders but i prefer to use "draw9patch.bat" tool which comes with android sdk. draw9 lets you preview what your stretched image will look like.
TIP: If your image has rounded corners avoid adding pixels around them like the image above. This will prevent the png from being stretched and looking like a turd!
When do i edit the 9patch border??
If you decompile an apk and make edits to a .9.png please check that your borders are unaffected and remain black/000000.
If you create an image from scratch then expand the canvas 2x2 pixels (thats a 1 pixel border for each side) and draw your BLACK borders.
Or
Open it up with draw9 and add borders.
.9.pngs use a 1 pixel BLACK (000000) border to determine its characteristics and how it behaves.
- The green borders (top and left) controls which part of the image is stretched.
- The red borders (bottom and right) controls where the text is displayed on the image if applicable.
I used green and red for display purposes!!.
WHENEVER EDITING .9.PNG'S ALWAYS ENSURE THE BORDERS ARE NOT COMPRIMISED AND MUST BE A SOLID BLACK, RGB CODE= 000000
You can use a graphics editor to create these borders but i prefer to use "draw9patch.bat" tool which comes with android sdk. draw9 lets you preview what your stretched image will look like.
TIP: If your image has rounded corners avoid adding pixels around them like the image above. This will prevent the png from being stretched and looking like a turd!
When do i edit the 9patch border??
If you decompile an apk and make edits to a .9.png please check that your borders are unaffected and remain black/000000.
If you create an image from scratch then expand the canvas 2x2 pixels (thats a 1 pixel border for each side) and draw your BLACK borders.
Or
Open it up with draw9 and add borders.
Next tutorial...
Universal zip