Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating 9-Patch Images on Device
    text
    copied!<p>I am trying to create 9-patch images using bitmaps on the device. I am aware of the draw9patch tool and I know how to use it however the images in question are customized by the user thus using the tool and adding images as resources is out of the question.</p> <p>My research has led me to this discussion: <a href="http://groups.google.com/group/android-developers/browse_frm/thread/4fb0243754ce32/8c9663d62ed7be91?q=NinePatchDrawable+constructor#8c9663d62ed7be91" rel="nofollow">http://groups.google.com/group/android-developers/browse_frm/thread/4fb0243754ce32/8c9663d62ed7be91?q=NinePatchDrawable+constructor#8c9663d62ed7be91</a></p> <p>An Android Engineer indicated the following: "The byte[] is the raw data of the PNG 9-patch extension chunk that we defined for android, which aapt generates; you'll have to build that all yourself, and look at the ResourceTypes.h header file for a description of its contents".</p> <p>Also, according to this disscusion: <a href="https://groups.google.com/group/android-developers/browse_thread/thread/22f402ccedba9533" rel="nofollow">https://groups.google.com/group/android-developers/browse_thread/thread/22f402ccedba9533</a> 9-patch images can be 'created' using any photo editing software but the aapt embeds additional information into the image during apk compilation. It is the work of the aapt it looks like I am trying to replicate.</p> <p>Is anyone aware of any examples on how to accomplish such a thing or have any tips whatsoever on how to approach this? Any comments are greatly appreciated!</p> <p>Matt.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload