[Epic 4G Themes] dreamsforgotten:
[GUIDE] Learning to Theme: Putting the tools to use

APK Manager:

This is one of my favorite programs it makes the whole process smoother imo.

Navigate your harddrive to c:\apk manager\ or wherever you extracted the progam to.

Grab the framework-res.apk from a theme template/rom/etc.. and drop it in the folder called "place here for modding"

Double click on Script.bat. Leave the apk manager window with the folders (where Script.bat is) open.

Look into the second section called "Advanced tasks Such As Code Editing

Type "9" to decompile apk

Immediately type 11 to recompile apk (This step is because I have ran across framework-res.apk's before that wouldn't recompile even if no changes were made and this could save you some time down the road.

Minimize the window, Maximize the apk manager window

Open the folder called projects

Open the folder called framework-res.apk

Open the folder called res

Here is where there are plenty of files you can edit. These are the XML files that control the look and behavior of android. If you are lost at this point, lets work on a file together to get the feel for what is possible in here. Scroll down and click on the folder called "values" and open it. Inside you will find a file called colors.xml. Right click on the file and choose open with and choose notepad if you have nothing else that works as a basic text editor. Me personally, I use Notepad++. It's a free download. Either way once it is opened, you will see many values that look like this:

(This is not stock Epic colors.xml file so don't be confused)

#ffb97f7d

#ffffffff

#ff000000

#00000000

#ff000000

#ffffffff

These are text colors for your primary and secondary text on your phone, as well as background highlight colors.

Note Background_dark background_light. That is the background color so if it is the same as your text colors you won't be able to see the text. I made this mistake before so you can change every text color in this file but leave the backgrounds alone, or use a color your text will show up on.

#ffb97f7d

#ffb97f7d

#ffb97f7d

#ff64917d

#ff64917d

#ff64917d

#ff64917d

#ff808080

Here, the color name=" describes the text, the "#ffb97f7d" is actual code for the color.

So if you want to change this color, where do you get the codes from?

Easiest way for me is to use the color chooser in Gimp, when you pick a color, either background or foreground, it will show you the hex value on the screen. But remember that the color codes Gimp gives you hold 6 places ie #000000. The values in the xml files hold 8, so when you compile there will be an error. That is because the first two places describe transparency. You need to add "FF" in front of any value you get from Gimp. So if the code in Gimp is 000000 in the xml file you need to put #ff000000. Always start the code with a "#".

Now the question is what text is described by dim_foreground_dark? Two ways to find out. Change it, compile it, flash it. Or dig around the "out" folder in apk manager and look for text xmls. The next one is located in /apk manager/projects/framework-res.apk/res/color

You will see primay_text_(dark)(dark_disable_only)(dark_focused)(dark_nodisable)(light)(light_disable_only)(light_focused)(light_nodisable)

Search_url_text

secondary_text_(dark)(dark_nodisable)(light)(light_nodisable)

tab_indicator_(text)(textv4)

and a few more. You can open each of these xml files and see what's inside. We'll use primary_text_dark.xml as an example. Right click and edit with notepad++

Take a look at this line in the code:

android:color=" (this tells the xml what color to display. The @color tells where to pull the value from. So you either find color.xml like we did above and edit the field bright_foreground_dark_disabled to render the color your after, or you can simply put the hex color code right here bypassing the need to look up @color(color.xml). It would look like this if you did that. and the "#ff000000" would give this text color the value of black. Instead if you had used the color "#ffffffff" you would get the color white.

Here note android:color in the code. That's because some of the values are for text, and some are for background. In the text lines elsewhere, as seen below, we will use android:textColor instead.

Now this is all general text colors. If you want to edit status bar text, both in the status bar, and when it's expanded, you'll need to dig in a different folder. Navigate to this folder in apk manager on your c:\ drive. C:\apk manager\projects\framework-res.apk\res\layout. You are looking for the following file called status_bar.xml.

Keep in mind when your looking through these xml files, you will see this value in a lot of fields "android:id="@id/icons" or something similar. These are keys to what you are editing. The first line you might want to edit in status_bar.xml would be line #13 which looks like this:

The only thing that's important on this line is @id/tickerText which tells you a color value here would let you change the color of the ticker text. The ticker text is the text that pops up in the status bar for things like a text message being recieved, and if your phone is set that way, the content of your text message.

There is just one problem here. In most lines where you can edit color you will see this already in the line android:textColor="********" and that value is NOT in the ticker text line. But being that this is a text view line because the id is ticker text, you can add the value android:textColor in right before the words "android:id=". The edited line will look like this: