Created
November 20, 2015 06:49
-
-
Save granoeste/af4bb6ebdecd6e8af630 to your computer and use it in GitHub Desktop.
[Android] 9-Patch Validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------- | |
# Verifies the 9patch using aapt command | |
# ---------------------------------------------------------------- | |
$ aapt | |
... | |
aapt c[runch] [-v] -S resource-sources ... -C output-folder ... | |
Do PNG preprocessing on one or several resource folders | |
and store the results in the output folder. | |
aapt s[ingleCrunch] [-v] -i input-file -o outputfile | |
Do PNG preprocessing on a single file. | |
... | |
# ---------------------------------------------------------------- | |
# e.g. Single file | |
$ aapt s -i res/drawable-xxxhdpi/btn_on.9.png -o /dev/null | |
Crunching single PNG file: res/drawable-xxxhdpi/btn_on.9.png | |
Output file: /dev/null | |
ERROR: 9-patch image res/drawable-xxxhdpi/btn_on.9.png malformed. | |
No marked region found along edge. | |
Found along left edge. | |
# e.g. resource folders | |
$ aapt c -S res -C /var/tmp | |
Crunching PNG Files in source dir: res | |
To destination dir: /var/tmp | |
ERROR: 9-patch image res/drawable-hdpi/btn_on.9.png malformed. | |
No marked region found along edge. | |
Found along left edge. | |
ERROR: 9-patch image res/drawable-hdpi/btn_off.9.png malformed. | |
No marked region found along edge. | |
Found along left edge. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment