FORUMS
Remove All Ads from XDA

[TEMPLATE][CM9] CM9 Theme Template

617 posts
Thanks Meter: 839
 
Post Reply Email Thread
THEME TEMPLATE - CM9

WARNING: MAY CAUSE A SEVERE ADDICTION TO THEMING

I have received numerous requests about theming CM9 from various people, and after directing them all to my home forum where I have a template, a member here (ebs512) suggested that I post the template here because it was so useful.

Some up-and-coming themers have indicated that some of the experienced themers have been reluctant to help them too much with creating new themes so in order to alleviate both the flood of PMs that experienced themers have and the lack of help that the newbies receive, here is a CM9 Template for everyone.

It's currently only for MDPI and HDPI but Anyone can easily add XHDPI compatibility by using my XML generator, see directions at the bottom concerning Density and Compatibility

PREREQUISITES: YOU MUST HAVE APKTOOL INSTALLED
There are many, many tutorials on how to install apktool, just google it.

Directions:

1. Download the template from Mediafire (updated 7/20/2012)

2. Unzip the code to a convenient location

3. Edit the images, change colors, do everything you want to it

4. Choose the Compatibility you want by following the directions of your choice (See below 4.1-4.4)

5. Open up your command prompt

6. Enter the following command:
Code:
apktool b location_of_the_source_code_folder
and it will build.

7. Don't forget to sign the apk before installing it

8. Publish your theme here or on Google Play


DISCLAIMER: I am not responsible for negative comments you receive if you create a terrible theme. Everyone has full permission to create themes off this template and distribute them (if you plan on creating paid themes, please also provide a free download in the spirit of open source).



DIRECTIONS FOR XHDPI COMPATIBILITY
Since you are using apktool to build your theme, there are inherent problems that are unfixable. The problem lies in the location of the Preview.png that shows up when you open up the theme chooser. Leaving it out will let your theme be compatible with all densities, but you will not be able to show a preview.



4.1 To make compatible with HDPI and MDPI (and LDPI)
1. Install a framework-res.apk from a Samsung Galaxy S2 CM9 ROM by downloading the apk and typing:
Code:
apktool if location_of_SGS2_ICS_framework\framework-res.apk
2. Make sure you have HDPI and MDPI folders in the theme folder with the proper images
3. Place the Preview.png in the XHDPI folder, that's right, the XHDPI folder
4. Compile




4.2 To make compatible with MDPI only
1. Delete the contents of the HDPI folder
2. Move the Preview.png from the XHDPI folder (its default location) to the HDPI folder
3. Compile



4.3 To make compatible with XHDPI and HDPI
1. Delete the MDPI Folder
2. Install an XHDPI framework-res.apk from an XHDPI CM9 ROM (Like the Galaxy Nexus):
Code:
apktool if location_of_XHDPI_framework\framework-res.apk
3. Add Images for XHDPI to the XHDPI Folder (make sure they are named correctly)
4. Move the Preview.png from drawable-XHDPI to the drawable folder
5. Compile




4.4 To make compatible with everything
1. Open up the AndroidManifest.xml and add a backslash "\" before "@drawable/preview"
2. Add XHDPI images
3. Install an XHDPI framework-res.apk from an XHDPI CM9 ROM (Like the Galaxy Nexus):
Code:
apktool if location_of_XHDPI_framework\framework-res.apk
4. Compile




More information on how to theme certain elements is located in this wonderful guide by xda member nhnt11




I do not have a donation button, but if you feel like it, purchase one of my CM9 Themes (available on several forums for free) off google play

Please visit the original thread on my home forum also.

And... if you are really stuck and need to talk to me, send me a PM or hit me up on gtalk at [email protected]
The Following 35 Users Say Thank You to anthonycr For This Useful Post: [ View ] Gift anthonycr Ad-Free
 
 
15th July 2012, 04:48 AM |#2  
x-dira's Avatar
Senior Member
Thanks Meter: 128
 
More
thanks! u can make THEME TEMPLATE - CM7
sr! is my english so bad
15th July 2012, 06:30 AM |#3  
pFo-Mac's Avatar
Senior Member
Seoul
Thanks Meter: 91
 
More
Thanks for this. I'm sure it will be of tremendous help to many of us.
15th July 2012, 12:55 PM |#4  
anthonycr's Avatar
OP Senior Member
Flag Albany, NY
Thanks Meter: 839
 
More
Quote:
Originally Posted by x-dira

thanks! u can make THEME TEMPLATE - CM7
sr! is my english so bad

If you're asking me to make a CM7 template, there isn't a need because there are already templates for CM7 like the cyanbread theme.
The Following 2 Users Say Thank You to anthonycr For This Useful Post: [ View ] Gift anthonycr Ad-Free
15th July 2012, 06:13 PM |#5  
ebs512's Avatar
Senior Member
Flag Austin
Thanks Meter: 1,379
 
Donate to Me
More
This thread should be stickied!

Sent from my Nexus S 4G using Tapatalk 2
15th July 2012, 06:54 PM |#6  
Kameirus's Avatar
Senior Member
Flag Red Bluff, California
Thanks Meter: 2,360
 
Donate to Me
More
Quote:
Originally Posted by ebs512

This thread should be stickied!

Sent from my Nexus S 4G using Tapatalk 2

dumps some strawberry syrup all over this thread

there now its real sticky ..lmao

just kidding around
The Following User Says Thank You to Kameirus For This Useful Post: [ View ] Gift Kameirus Ad-Free
15th July 2012, 07:37 PM |#7  
Nate456's Avatar
Member
Thanks Meter: 6
 
More
Thank you anthony for making this
16th July 2012, 06:18 PM |#8  
anthonycr's Avatar
OP Senior Member
Flag Albany, NY
Thanks Meter: 839
 
More
Updated OP with directions about making your theme compatible with different screen densities. PLEASE READ those directions, because if you don't you will have problems applying it. Take special note about installing the proper framework-res.apk with apktool.
The Following User Says Thank You to anthonycr For This Useful Post: [ View ] Gift anthonycr Ad-Free
16th July 2012, 06:52 PM |#9  
kuci06's Avatar
Senior Member
Thanks Meter: 80
 
More
Quote:

MDPI included


YES
16th July 2012, 08:22 PM |#10  
Thanks for this! Do you have any tips in regards to batch editing images for mdpi? It's going to take me a while to get through the 2587 images in the hdpi so when I've done it would be nice if I could just run a handy tool of some sort to re-size them all for mdpi/xhdpi.
16th July 2012, 09:21 PM |#11  
anthonycr's Avatar
OP Senior Member
Flag Albany, NY
Thanks Meter: 839
 
More
Quote:
Originally Posted by XperienceD

Thanks for this! Do you have any tips in regards to batch editing images for mdpi? It's going to take me a while to get through the 2587 images in the hdpi so when I've done it would be nice if I could just run a handy tool of some sort to re-size them all for mdpi/xhdpi.

Batch resizing is a bad idea with all the .9.pngs, but if you want you can batch resize non-.9's. Batch recoloring is very simple with Photoshop (which I don't have).I use GIMP to batch edit. There are a couple plugins for it, but I use a script and edit using the command prompt. If you have Photoshop though, use that, it costs a lot because its the best. //Advice
The Following User Says Thank You to anthonycr For This Useful Post: [ View ] Gift anthonycr Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes