Editing .9's for dummies...like me. *With pictures!
#1
Posted 26 February 2013 - 04:59 PM
The biggest thing I was not understanding was the addition of using draw9patch to give the image it's stretching patches ( The black lines) for 2 reasons.
1. Draw9patch is a difficult program for me to use (..as is using apktool which is why I wrote this tutorial on an alternative)
2. The fact that I was doing my edits WRONG!!!!
I read repeatedly how important it was to keep from altering the black patch lines but my problem was, the .9's I was editing didn't have patches...and I didn't know why. Here is why and a quick and simple guide to doing them correctly.
- disturbed58, T3T3droid and jp1044 like this
#2
Posted 26 February 2013 - 04:59 PM
Basically...
1.png 151.66KB 69 downloads
I was editing the wrong files! I was unzipping the compressed images and doing my edits from those. Now,before I make myself sound really dumb,yes..I know that when you decompile a .APK , that it decompresses everything so that XML's etc. can be edited . But what I didn't realize was that it also decompresses the hidden information in those .9's and you can edit those all day long , but you will always see those black bars in your theme. (I'll fill you in later on how dumb I felt when I finally understood what I was doing wrong)
YES...I ADMIT..I AM DUMB!
OK..let's start doing this the RIGHT way.First,decompile whatever .APK you want with whatever your preferred app. I am using VTS so this is what my decompiled framework-res drawable-hdpi folder looks like.
2.png 178.77KB 80 downloads
First thing we want to do is make a copy of the image that we want to edit and place it somewhere you'll remember,just in case you get an error in apktool because you destroyed the patch.
Select a .9 and open it up in Photoshop,GiMP or whatever image editor you like.
Select the rectangular marquee tool and make a selection around as much of the image that you are trying to edit
3.png 160.52KB 84 downloads
4.png 163.83KB 87 downloads
And create a new layer
5.png 173.75KB 87 downloads
Repeat the rectangular marquee tool around the image you are wanting to change but this time delete it..this is what you will have...
6.png 161.88KB 86 downloads
Now,select the top layer so you can edit it. The easiest things you can do are to either change the Hue/Saturation or to create a layer style such as a color overlay...well stick to the basics for now.
7.png 214.76KB 80 downloads
Whatever color you have selected is the color you will be altering the image..but to see the changes,you'll need to click the colorize button. As you can see the black bars are still nice and black...and aren't being touched.
8.png 176.62KB 78 downloads
You can add your special little touches, change the transparency...whatever. Just make sure that any of your edits such as glow effects do not encroach too close to where the patch lines are going to be because there is a good chance you'll get an error when compiling. Once you are done,merge the layers (delete any that you are not using first) And just save. if you did it correctly,it will automatically overwrite the original.
9.png 220KB 82 downloads
And here is our newly created .9
10.png 269.6KB 72 downloads
Now recompile....
And here is our compressed .9
11.png 224.09KB 62 downloads
Now...because I was hung up on the whole draw9patch thing and since I never fully understood what recomiling a .9 actually did, but didn't want to be that kid in class that asks the teacher a question in fear of being laughed at..I wrote this....which is almost like asking that question and being laughed at! Hahahaha
Now you understand why I felt so DUMB!
- disturbed58, usmcamgrimm, T3T3droid and 3 others like this
#3
Posted 26 February 2013 - 04:59 PM
Screenshot_2013-02-26-19-26-50.png 295.65KB 43 downloads Screenshot_2013-02-26-19-47-18.png 238.6KB 42 downloads
I hope that this helps somebody!
- s.dubs, usmcamgrimm, T3T3droid and 4 others like this
#4
Posted 26 February 2013 - 07:12 PM
- B.E.McAllister and jayrod like this
#5
Posted 27 February 2013 - 12:19 AM
#7
Posted 27 February 2013 - 06:08 PM
#8 Guest_24v_*
Posted 27 February 2013 - 06:38 PM
http://developer.and...html#nine-patch
And here is a good image showing them.
- jayrod likes this
#10
Posted 27 February 2013 - 07:08 PM
Here is a good explanation of how 9 patch images work, and what the guides do.
http://developer.and...html#nine-patch
And here is a good image showing them.
Thanks for that..I have looked for something like that for a while
#11
Posted 28 February 2013 - 06:37 AM
Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!
#12
Posted 04 March 2013 - 06:19 PM
Sent from my DROID RAZR using Tapatalk 2
#13
Posted 05 March 2013 - 03:24 AM
Sent from my Flying Spyder that likes jelly beans
#14
Posted 05 March 2013 - 03:30 AM
uploadfromtaptalk1362484624501.jpg 72.77KB 25 downloads
uploadfromtaptalk1362484635941.jpg 73.43KB 27 downloads
uploadfromtaptalk1362484655251.jpg 79.36KB 27 downloads
Sent from my Flying Spyder that likes jelly beans
#15
Posted 05 March 2013 - 09:40 AM
What are you using to edit images?
Sent from my Flying Spyder that likes jelly beans
I've been using Photoshop and paint.net depending on the image. I followed this thread to edit through VTS and had the same issue.
Trying to work on some semi-transparent boxes and stuff for the theme I'm working on.
Sent from my DROID RAZR using Tapatalk 2
#16
Posted 05 March 2013 - 10:00 AM
#17 Guest_24v_*
Posted 05 March 2013 - 10:21 AM
#18
Posted 05 March 2013 - 10:35 AM
Sent from my Icarus HD Edition Bionic
#19
Posted 05 March 2013 - 01:14 PM
- jayrod likes this
Nice job on the signature, jl90...thanks!
#20
Posted 06 March 2013 - 05:23 AM
Or edit them in fireworks. Photoshop and gimp have problems with indexed png's.
Ooooooohhh I just got Fireworks not too long ago. Might have to try it out on some pngs
Sent from my Nexus 4 using Tapatalk 2
If you feel the urge to donate to me, you can do so here -> Donate
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users