title: Android: compiling 9-patch files to be used outside of the drawable folder?
body: <p>I have a need to load 9-patch files from outside of the drawable folder. This is so that my application can download new skins from a server, for example. I have discovered that a 9-patch image stored in the drawable folder is compiled when the .apk is made. The exact same file read from the assets folder does not have the 9-patch chunk. Thus the act of making the .apk is compiling the source 9-patch files in the drawable folder, but not in the assets directory.</p>
  
  <p>How can I compile a 9-patch file myself, so that I can install it in the assets directory? Is there a (batch) tool to convert the source to the compiled version with the 9-patch chunk? I'd really, really like not having to use Eclipse/Ant to build an .apk and then pick it apart to extract the compiled 9-patch file if at all possible.</p>
  
  <p>For now I just want to be able to read from the assets directory (for example, have a sub directory per skin) to keep it simple. The next step is to compile the source image to add in the 9-patch chunk. After that I'll worry about downloading on the fly to the /data folder - if I can't compile the 9-patch file then there's little point in adding server side effort. </p>