2011년 1월 7일 금요일

[Android Course][English][Theme] - Android's 9-patch (nine patches) drawable definition and production methods




1. Definition
'Android' and 'NinePatch' graphics that will support a bitmap image.
There is a PNG image Stretchable (growing) region can be defined.
9-Patch (NinePatch) images typically view (View) is used as a background image. The actual button 'Default Background' image 9-Patch (NinePatch) is in the image.

In general PNG image types with 1pixel border is composed of. Does not stretch as far as this border area will define the area. 1 pixel black line at the top of the left and can grow to define a portion. May increase the portion can be multiple.

1 pixel black line on the right side and bottom views are what draw the region to decide. In other words, to determine the padding area. If you draw the line at the top of the left and the lines are used. For example, if the text is drawn in the view text is displayed in the sections of this line is drawn.




2. How to make
9-Patch (NinePatch) images in order to make the draw9patch Tools directory of the SDK that contains an image editor. 'draw9patch' tool allows you to easily create.

1)   'draw9patch' tool Path.
: android-sdk-windows\tools\draw9patch.bat
2) 사용법
- 'draw9patch.bat' 실행

- Stretchable Image Setting
: 일반 'Stretchable Image'를 'Stretchable area' Top or Bottom에 설정.





















- 'Android Project' in the use of
: The Image 'fileName.9.png' and 'Android Control' when applied to 'fileName' portion is also available.


In addition, inquiries, or questions, please contact us.
(joonryang@gmail.com)

댓글 없음:

댓글 쓰기