Skip to content

dagezi/gradle-android-9patch-plugin

Repository files navigation

gradle-android-9patch-plugin

What's this?

With this plugin, you can programatically create 9patch PNG files from normal PNG files, Instead of manually edit PNG file to create 9patch!

How to use this?

TODO: upload to bintray.

You can specify strech and padding information of 9patch in gradle files.

example

    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.

Acknowledge

Copyright

Copyright (c) 2015 SASAKI Takesi <[email protected]>.

About

Create 9patch from normal PNG

Resources

License

Stars

Watchers

Forks

Packages

No packages published