A Tutorial on Android Themes

Hey guys, I was asked how to make an Android Theme, and as I answered the post, i realized that it became very long, so I'll post it here instead, to have some content and very many commas :P


Prerequisites / what you need


First of all, what you need:

  -A file extracting program like 7zip ->   http://www.7-zip.org/

  -A good photo / image editor (Artweaver is real insider's tip (essentially a free Photoshop clone);
   Gimp can be sufficient if you don't have alternatives) ->   http://www.gimp.org/ | http://www.artweaver.de/

  -The Official Android SDK (for the 9patch-drawer) ->   http://developer.android.com/sdk/index.html

  -This APK Managing Tool (i think it's called xUltimate, you can find some tutorials on this site)
   ->   http://www.shadyfilehoster.com/files/apk-manager.rar

   -A File Manager on your Android Phone, my personal favourite is ES-File Explorer
    (which is free, looks nice, has professional features and root capabilities, check the Settings Menu)
    ->   https://play.google.com/store/apps/details?id=com.estrongs.android.pop

  -A hang for trial & error


_____________________________

Getting Started


1. you should decide what you want to change graphically, most .apk's (the executables of Android) are stored in either:
                 /system/app/
                 /system/apps/   or
                /data/app/
    on the root of your internal storage.

If you, for example, want to edit the Status-Bar of Android, that's in SystemUI.apk in /system/app, if you want to for example change the appearance of the notifications or other system stuff, that's in Framework-Res.apk.
Now you should extract the .apk (it's nothing more then a zip) and there will be folders called drawable, drawables-hdpi, drawable-mdpi etc., where for example hdpi stands for high dots per inch (e.g. 800x480, 1280x720 etc) and so on.
There will be graphics files that end with .9.png, those are 9-patch files, which mean they consist of
9 parts ,and are used for scaling, the top discipline of android. You can read more about it on here http://goo.gl/0Yuve (credits go to Yorzua of xda-devs)


a typical 9-patch file

Now change the graphics to your likings, and once it looks exactly how you want it to look (and please don't be sloppy! Check for wrong pixels and Aliased edges, which are often a product of too many round, overlapping layers. The outcome will be +200% better if you remove them), open the .apk again and insert all the stuff via drag&drop (this might be cheap but works).


The APK Manager


Signing

Now you have to go to the APK Manager folder and place your file in the place-here-for-signing folder, start the APK Manager and choose option '16' (batch signing), fig. A.

the APK is beeing signed

This is neccessary for your file to work on Devices with enforced Signatures (which are, like, most?).

Optimizing

After this is done, you can choose to optimize your file, which makes it smaller (PNG-optimizing) and faster to process (Zip-Aligning). To do this, choose option '15', fig B.


the APK will be zip-aligned and png-optimized (zp)

Don't mind the strange numbers running down as if your PC was the Matrix, it's trying to find the most efficient optimizations (fig C).

Rinse and Repeat


After you're done with signing and optimizing, it's time to transfer the APK to your Phone, either manually, or, if you have the Android SDK installed (which you should, if you paid attention!), via option '13'. Though I think that this option is only possible if you set your .apk up as a Project, which involves a little more work (like, 5 clicks more...).

The last thing to do is the most tedious one; It could happen to be that your app isn't working, or that it's force closing. At this Step you have to track down the errors you possibly made, e.g. you only changed the MDPI graphics, but your device is categorized as HDPI or LDPI. Or maybe you didn't use the 9patch tool from the tutorial to compile the 9patch files, or you wrongly inserted the files into the APK via 7zip.
But, if you keep your work clean and traceable, then you won't have to guess much about what happened, and often times it also goes by without an annoying error.


I wish you guys much luck, and am thankful to help anyone who wants to participate in this awesome world of Graphics Design!


Good Luck!
Good Luck!
....................







Tutorial © 2012 by D. Kostov, xiq REVOLUTION Labs

Kommentare

Beliebte Posts aus diesem Blog

10 Free YouTube Like And Subscribe Button Animations That Will Give You A Headstart On Your Competition

LG hides swear words , bad words in Settings file

Castlevania-style Axe-Throwing with Gamemaker: Studio