With this plugin, you can programatically create 9patch PNG files from normal PNG files, Instead of manually edit PNG file to create 9patch!
TODO: upload to bintray.
You can specify strech and padding information of 9patch in gradle files.
round_rect {
vStretch 8, 32 // row 8 to 31 will stretch. Note that end exclusive.
hStretch 8, -8 // Negative value specifies the distance from end
vPadding 7, 33 // Bad example. Use even number to avoid error for 'hdpi'
hPadding 7, -7
}
See ninepatch.gradle for more.
- gradle-android-ribbonizer-plugin, which inspired me and provided a lot of code to refer.
Copyright (c) 2015 SASAKI Takesi <[email protected]>.