DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 3 of 3

Thread: How To Edit .9.png's

  1. Developer
    CorCor67's Avatar
    Member #
    64549
    Join Date
    May 2010
    Posts
    440
    Liked
    16 times
    Twitter
    _CorCor67
    Phone
    Droid DNA
    DroidForums.net Developer
    Premium Member
    #1

    How To Edit .9.png's

    I have seen lots of questions about the 9patch images lately, and filled my inbox trying to explain to others. Figured it's time for a write up. There are other ways of doing this, this is what works for me. If you have another method please add to this.

    To complete this "how to" you will need these programs installed on your computer

    The android sdk
    Android SDK | Android Developers
    The compiler
    [Release] xUltimate


    In this example I will be editing the genie widget, a smoked glass look with gradient red highlights.

    1. First I need to open up the genie widget apk, all the files in here ending in .9.png will be modified.


    2. I pulled the .9.png's to a folder on my desktop and named it "genie widget".


    3. Using your favorite editor, I use gimp, change the widget to look how you want it, then save it under the same name.





    4. Right click on your image and open with draw9patch.(draw9patch is in the tools folder of the android sdk)


    5. In draw9patch you can only edit a 1px border, the rest goes untouched.


    6. If you check the extra boxes at the bottom it will show your patches. The top and left border determine where the image will be stretched. The bottom and right border determine where content can be placed in the image (shown in blue in the right window)


    7. Do this with all of the images, be sure not to stretch rounded corners or any designs you put in there. When done with each just click (file/save)



    8. Now with the compiler, you should have extracted the contents of the zip to a folder. Inside this folder is (example1, example2, and music) folders plus an icon. Open example1/res/drawable-hdpi and erase all the images from here (or move them somewhere else). Now put all of your patched images in here. Go back out to the root of the folder and double click the icon, a command window will pop up and in a few seconds you will see a folder named "done". Inside is your example1 folder with your images. Now just pull the images and stick them back in the apk and you now have a themed genie widget.





    I included the files I used, drawable-hdpi is the images with patches in place before compiled. GenieWidget.apk.zip is the full apk with the updated and compiled widget, edit the name to remove the .zip if you want to use it. Thebowers and pandroid both helped me figure this out, thanks to both of them.

    Attachment 10209Attachment 10210

    I might make this into a MM theme, just gotta figure out the thm file first, if you want to, go for it, just send me the file so I can put it up in this post.
  2.  
     
     
     
  3. Theme Developer
    icculusX's Avatar
    Member #
    36395
    Join Date
    Feb 2010
    Location
    The Moon
    Posts
    2,541
    Liked
    2 times
    Phone
    RAZR!
    DroidForums.net Theme Developer
    Premium Member
    #2
    Yea, 9-Patch files are annoying. Wish they were easier to work with. Nice post man, well layed out... I am sure many will find this useful!
    The Mooooooon!
  4. Developer
    CorCor67's Avatar
    Member #
    64549
    Join Date
    May 2010
    Posts
    440
    Liked
    16 times
    Twitter
    _CorCor67
    Phone
    Droid DNA
    DroidForums.net Developer
    Premium Member
    #3
    Thanks, woulda helped me when I was trying to figure them out, hopefully helps others.

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Please help me edit
    By dr0idg0d23 in forum Android Themes
    Replies: 7
    Last Post: 05-11-2010, 08:16 PM
  2. Uhm....where's the edit button??
    By Slider46 in forum Off Topic Forum
    Replies: 5
    Last Post: 03-15-2010, 07:03 PM
  3. can i edit roms like this?
    By tktouch12 in forum Android Hacks and Help
    Replies: 7
    Last Post: 02-17-2010, 09:56 PM

Search tags for this page

.9.png

,

9.png

,
9.png editor
,
android 9.png
,
edit .9.png files
,
how to edit .9 png
,
how to edit .9.png
,
how to edit .9.png android
,
how to edit .9.png files
,
how to edit 9.png
Click on a term to search our site for related topics.

Tags for this Thread

Find us on Google+