web analytics

Nine-patch editor

As you know – there is a standard WYSIWYG editor for nine-patch (.9.png) files within the dev tools for Android developers. Once i have started integrating nine-patch file format support into Swing components i noticed that its really inconvenient to use. So i got an idea to create my own small nine-patch file editor…

After working a few days of work i have finished it:

The main advantages

1. Comfortable WYSIWYG editor – easily add, move, resize and remove patches
2. Mistakes-free editor – it won’t allow you to create any incorrect patches data
3. Quick preview – see all the changes you do in realtime on a small preview with custom content
4. Changes history and patches copy/paste tools included

Upcoming changes

1. Possibility to work with multiple nine-patch images at the same time
2. Patches data synchronization between multiply opened nine-patch images
3. Additional editor tools and visual settings
4. Possibility to save opened nine-patch images as a separate project
5. Possibility to perform basic edit operations with image (move, crop, per-pixel-draw)

As you can see – there is still a lot of things to do to improve the editor, but it is already much more user-friendly than Android standard editor. If you don’t believe me – just try itΒ πŸ˜‰


You can always download the latest version here:


  1. Suyen Li
    Apr 01, 2017 @ 03:27:56

    how to run it ?

    • Mikle
      May 26, 2017 @ 16:36:41

      To launch it you need to download `ninepatch-editor-xxx.jar` artifact – it is a special executable for Java machine (JRE / Java Runtime Environment). To run it you will need to download a JRE version 6 and later if you don’t have it installed yet. It creates associations with `.jar` files automatically so if you are working under Windows OS you should be able to simply double-click it to run it. For a more extensive guide you can read any of articles available on the net.

      And sorry for the late answer, some comments got lost due to internal issues on the hosting and I managed to restore data only recently.

  2. Ron
    Jul 14, 2016 @ 18:58:42

    So cool ! πŸ™‚

    I was so disapointed by the android 9patch editor that I just started a new project called “NinePatchEditor” (i’m a android developper from Paris :)), but then I came here… πŸ˜‰

    Thanks you so much! Will save so much time.

    • Mikle
      Dec 05, 2016 @ 20:20:03

      Glad it was useful πŸ™‚

      I will be bringing updates to the tool, just had to delay them due to library changes I’m working on really hard this year.

  3. VAdaihiep
    Jul 08, 2016 @ 11:08:01

    Thank you, very useful.
    Wish it have export to multi screen type like xx-hdpi, x-hdpi, etc.

    • Mikle
      Jul 09, 2016 @ 03:16:20

      I am planning to add some improvements to the editor in the future, but so far unfortunately I’m completely buried under tons of stuff I have to do for the library and other projects first.

      Also I’m not really sure what do you mean under “export”, 9-patch images are raster and they won’t really scale well to higher resolutions, so you have to have different source images for differed resolutions.

      Or you meant the downscaling? That is something that could actually be done, but I’m not sure how exactly should it work.

  4. Chhote Lal Babu
    Jan 22, 2016 @ 16:55:30

    Very nice tool for Designer as well as developer and it saves 80% time, So lot of thanks!

  5. REDZ
    Jul 05, 2015 @ 23:48:17

    thanks man

  6. Kelvin
    Aug 07, 2014 @ 12:28:08

    This is perfect! Thank you – this is far more intuitive than the draw9patch tool and is far more accurate.

  7. Ferry Irawan
    Jun 13, 2014 @ 13:15:09

    I usually don’t comment on posts i’ve found while googling,
    but this app, sir, is the best and free 9-patch editor i’ve found so far!

    Great job!! and thank you so much for making this app!

  8. Kdio
    Jun 09, 2014 @ 07:40:48

    Mr. Garin
    As there was no records whatsoever about this magnificent tool at the XDA Developers Forum, I’ve just published a thread in there announcing and linking to you.
    Nice regards.


    • Mikle
      Jun 09, 2014 @ 15:20:33

      Thanks for linking Nine-Patch Editor tool on XDA forum!

      It is true that I didn’t advertise this tool a lot (not just on XDA, I actually hate any kind of advertisements overall), but it can be easily found through google with some general requests like “9-patch editor” and “nine-patch editing”. So basically making the site index-able for the search engines is more than enough for some cases nowadays. If your product is good or useful – people will link, repost, retweet, publish it on their own sites and blogs and it will finally be spread across the network – this is the way I feel products should be promoted, not through an annoying advertisement or spam-messages in comments across the blogs and sites.

      Anyway, thanks again for spreading the word! πŸ™‚

  9. Contapapo
    May 16, 2014 @ 14:07:14

    Thanks buddy. It’s the best and the easyest tool I’d found.
    Keep with your great job.

  10. Theodoros OhYeah
    Apr 25, 2014 @ 14:49:23

    Pretty cool editor. I really liked him. And it’s free!
    Thumbs up mate.

  11. Matej
    Mar 14, 2014 @ 12:47:58

    Great job! Really the best editor out there! I only wish I have found it earlier πŸ™‚

    However, there are few things you might consider for future development:

    1) Whether the image is or is not a 9patch should be determined from file extension *.9.png. I encounter a problem when I tried to create a 9patch from image which already had black outline – it was processed as if it was already a 9patch, destroing image outline.

    2) Some cropping capabilites. I’m looking for a feature that would allow me to delete (or add) rows/columns from image – to resize big stretchable areas.

    3) Some image scaling capabilities – it would be great to have some tool that would be able to scale 9patch in a way that keeps the border 1px large and up-/downscales the rest of the image.

    Anyway, thanks for the great work, this tool is a must-have for Android developer! I love the simplicity, ease of use, and pixel perfect precision!

    • Mikle
      Mar 14, 2014 @ 17:26:53

      Thanks for the feedback! πŸ™‚
      I will add all of those features in future updates for sure.
      Here is how I see it:

      1. I will still try to read image as 9-patch even if it doesn’t have .9.png, but i will ask whether user wants it to be considered as 9-patch image or not if patches are found on the specified image. If no patches found – image will be recognized as a non-9-patch image.

      2. I will allow cropping image like in all other graphic editors (by selecting area you want to keep) but will also allow to remove selected columns/rows from the image (basically – the same way patches could be added now, but cropping will be done with another tool).

      3. This is a pretty simple one and I understand why it could be useful – i will simply add “scale down” option somewhere on the toolbar or in some new menu.

      I didn’t update this editor for a long time as i was busy with some other stuff from the WebLaF library and other projects, but I will make sure to update it in this month. Some other changes will also be available in that update. That would probably be v1.28 version where you will find all these improvements.

  12. Adam
    Dec 12, 2013 @ 18:30:05

    real time saver πŸ™‚

  13. faninx
    Dec 06, 2013 @ 12:18:51

    It’s the best draw 9 patch tool I have used!!

Leave a Reply

Vortex Momentum