I'm attempting to use the Draw9Patch tool from the Android SDK, but immediately upon opening my image with Draw9Patch it shows all of my image area as a 'Bad Patch.' I manually drew in the lines that define the stretchable areas, however I am unsure if this will work properly. Could someone explain why this specific image is not a 'good patch'? Other Stackoverflow answers to this question do not seem to correlate to my problem or I am not understanding them.
The Draw 9-patch tool is a WYSIWYG editor included in Android Studio that allows you to create bitmap images that automatically resize to accommodate the contents of the view and the size of the screen. Selected parts of the image are scaled horizontally or vertically based on indicators drawn within the image.
A 9 patch image is a regular png (. PNG) image which is needful for android app developers where they require to wrap any content within a background image without pixelating the background image.
Old, but I had the same question. The "bad patch" thing is definitely confusing, but won't stop your drawable from working. The dev sites says it's basically a warning that those patch sites "may produce artifacts in the graphic when stretched".
If you look at a lot of the stock Android drawables you'll see that they contain "bad patches". So just test them out and if they look fine I wouldn't worry about it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With