[TEMPLATE][CM9] CM9 Theme Template

Search This thread

anthonycr

Senior Member
Mar 14, 2012
617
819
Albany, NY
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.
about.png

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 anthonyrestaino11@gmail.com​
 
Last edited:

anthonycr

Senior Member
Mar 14, 2012
617
819
Albany, NY
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.
 
  • Like
Reactions: ebs512

SXUsr

Senior Member
Jul 11, 2010
8,161
2,877
Here =)
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.
 

anthonycr

Senior Member
Mar 14, 2012
617
819
Albany, NY
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
 
  • Like
Reactions: muzicfreako

SXUsr

Senior Member
Jul 11, 2010
8,161
2,877
Here =)
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
I'll just do what i usually do and go through one by one where I don't already have an image to replace and batch what I can. I do use PS as my main editor along with Paint.Net for certain things.

Thanks.
 

ebs512

Senior Member
Mar 13, 2012
2,182
1,354
Austin
I'll just do what i usually do and go through one by one where I don't already have an image to replace and batch what I can. I do use PS as my main editor along with Paint.Net for certain things.

Thanks.

Get adobe fireworks for batch editing if you just want to change the color...otherwise if you use gimp get a plugin called bimp (batch image manipulation plugin)

Sent from my Nexus S 4G using Tapatalk 2
 
Last edited:

Woody77

Member
Jul 28, 2005
20
8
Could anyone please kindly help upload the template to another file host service?

For some reasons I was unable to download it from mediafire.

Thanks!
 

anthonycr

Senior Member
Mar 14, 2012
617
819
Albany, NY
I updated the theme template. CHECK the FIRST post.

CHANGE LOG:
* Themed the volume sliders and other sliders
* Fixed the problems with inverted apps not showing up correctly (most of them)
* Removed some unnecessary images from the template (cuts down on size)

Enjoy. I'm glad to see a bunch of you using this already, glad it's helping :)
 
M

marcellocord

Guest
Do you know how to fix missing assets? I know I can ignore it, but it's just annoying. btw, those lots of redirections at redirections.xml are really needed? I've never seen any theme like this.
 
4.4 To make compatible with everything
1. Open up the AndroidManifest.xml and add a backslash "\" before "drawable\preview.png"

This is confusing because preview.png isn't in the AndroidManifest.xml.
The correction is "\" before "@drawable/preview"

There is another thread with the how to make a T-mobile theme which have more detail what can be themed, see link. A reference to the post is helpful for beginners.

Please update the first post.
Thanks for posting.

---------- Post added at 07:22 AM ---------- Previous post was at 07:17 AM ----------

Do you know how to fix missing assets? I know I can ignore it, but it's just annoying. btw, those lots of redirections at redirections.xml are really needed? I've never seen any theme like this.

The redirections aren't required when you delete the following line from the AndroidManifest.xml
<meta-data android:name="com.tmobile.theme.redirections" android:resource="@xml/redirections" />
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    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.
    about.png

    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 anthonyrestaino11@gmail.com​
    5
    Got a couple of issues that I can't seem to figure out, I've changed the phone_dial_background_texture but it refuses to change when installed, and the two images in the drawable-nodpi, background_dial_holo_dark and background_holo_dark also refuse to change, along with some lock screen images that stay white..

    for background_holo_dark make sure this code is present in android.xml, if not, then add it. Rename background_holo_dark in nodpi folder by adding a prefix "framework_"

    Code:
    <item name="drawable/background_holo_dark">@drawable/framework_background_holo_dark</item>

    for background_dial_holo_dark check the same as above. But its code is entered in com_***something***_contacts.xml.
    4
    I updated the theme template. CHECK the FIRST post.

    CHANGE LOG:
    * Themed the volume sliders and other sliders
    * Fixed the problems with inverted apps not showing up correctly (most of them)
    * Removed some unnecessary images from the template (cuts down on size)

    Enjoy. I'm glad to see a bunch of you using this already, glad it's helping :)
    2
    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.
    2
    4.4 To make compatible with everything
    1. Open up the AndroidManifest.xml and add a backslash "\" before "drawable\preview.png"

    This is confusing because preview.png isn't in the AndroidManifest.xml.
    The correction is "\" before "@drawable/preview"

    There is another thread with the how to make a T-mobile theme which have more detail what can be themed, see link. A reference to the post is helpful for beginners.

    Please update the first post.
    Thanks for posting.

    ---------- Post added at 07:22 AM ---------- Previous post was at 07:17 AM ----------

    Do you know how to fix missing assets? I know I can ignore it, but it's just annoying. btw, those lots of redirections at redirections.xml are really needed? I've never seen any theme like this.

    The redirections aren't required when you delete the following line from the AndroidManifest.xml
    <meta-data android:name="com.tmobile.theme.redirections" android:resource="@xml/redirections" />