[HTC EVO 3D] aedon:
I have been themeing since windows mobile days, but this is my first tutorial so bear with me

But all that aside, this tutorial will be for adding an icon to the status bar clock on sense 3.0 in the systemui.apk :)

First you want to set up all your tools.

I have apktool 1.4.3 set up with current framework-res.apk and com.htc.resources.apk set up from it

However I use apkmanager 5.02 out of simplicity.

You can use whatever photo manipulation programe you want, I use photoshope

You will also need a draw9patch tool for this task.

You can find that in your sdk tools under C:\Program Files (x86)\Android\android-sdk\tools in most cases

Lastly you need a programe to work with xml's

I use dreamweiver but you can also use notepadd ++

So lets get started.

Connect your phone to your computer and pull the systemui.apk file from /system/apps/ on your device

you can do this many different ways.

ie.. adb pull

..android comander (my methode)

..root explorer

you can even just extract it from the rom zip.

Moving on.

Decompile the systemui

After the apk is decompiled, navigate to \SystemUI.apk\res\layout and open up the xml file names "statusbar"

you want to look for this line:

In the file I am working on it is line 9

You are going to want to change it to something like this :

*Note that in android: paddingRight I added a space so that it would not make a :p face. Keep in mind there is actually no space there

Now befor we move on let me explain the edits I have made.

Highlighted in red: This is the color of the text for the clock. If you know web hex colors, your good to go here. Just replace the 00 00 00 with the value you desire.

Highlighted in orange: change it from left centered to centered. Make the image... well centered haha

Highlighted in blue: This is where you add the bg for the clock. You can name it whatever you want but this is what I named mine when I made it.

Highlighted in green: This determins the distance from the right end of the taskbar that your new icon will sit. When I went through and did this, changing it from 6 pixels to 4 pixels worked with my icon image. It centered my icon behind the time perfectly. You may have to play with this depending on your icon.

That should take care of all the code edits.

Now we need to make the icon!!

Open your image programe of choice and open a new project set to 38 by 38 pixles

Design your icon however you wish but keep in mind that this will be a draw9 image so you want to have the center area streatchable without distortions

Once your happy with that, save it as a .png file and save a copy to your desktop.

Almost done

Open up the draw9patch batch file.

After it loads up, you should see a window pop up with an arrow.

Drag your icon from your desktop into this window.

You should now see your icon in this window

You can now play around with the .9 patch for this image :)

On the right hand side of the window you should see the 'demo' of your image.

It will have a virticle streach, horizontal streach and a diaganol streach.

only one that matters is the horizontal for this image.

Now, make the center of your icon streatchable, designated by the black pixels on the top and bottom of your image.

With mine, i left the last 6 pixels to the left and right blank on the top and bottom of the image.

On the left and right of the image, I filled all in but the last 2 pixels on the top and bottom.

After you are satisfied with that, file and save patch9.

you should now have an image on your desktop named "statusbar_clock_icon.9", or whatever you named your icon. The important part here is that you see the '.9' at the end.

Next, drop the icon into the SystemUI.apk\res\drawable-hdpi folder.

Next, recompile your apk.

Hopefully you get no errors.

Sign the apk if you feel the need to and then push it back into your phone and enjoy :D