Jump to content


Photo

Tips To Building A *better* Theme - Updated 9/29/12


  • Please log in to reply
32 replies to this topic

#1 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 27 September 2012 - 10:45 PM

Special thanks to mopar57, BigDaddyHicks, 24v, KBanause, iiandskater, and 00McD00 for there help and guides, which is where I learned some of these methods.



If you are a beginner at building themes then I suggest you read through this thread first and work on learning the basics first.

Please Login or Register to see this Hidden Content





This "guide" is really to help people transition from those beginning steps of building themes to more advanced processes that will help take your themes to the next level.
The bulk of this will be showing some of the most useful xml edits I have found and use in pretty much every theme I build.


Disclaimer: These mods should work on most roms, but there may be some differences depending on the rom.




Status Bar Clock


First and probably the most important (in my opinion) is the changing the color of the clock in the status bar. Most likely you have changed the color of the signal bars and battery so having a blue clock is just out of place.

Open SystemUI>>res>>layout>>status_bar.xml
You need to make edits on 3 lines. Just change the hex value to the color you want. For instance, with my Red Widow theme I used the hex code for red which is CD0000.So it should look like "#ffCD0000" instead of "#ff32aedc"



Line 7
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="16.0sp" android:textColor="#ff32aedc" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="18" />



Line 24
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ff32aedc" android:gravity="left|center" android:id="@id/clock" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />


Line 36 -- *This is the color of the date on the status bar pull down*
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="#ff32aedc" android:gravity="left|center" android:id="@id/date" android:background="@drawable/status_bar_background" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />


_________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________



ICS Blue Text throughout the rom

This edit is what will change the color of the text in a lot of places. For instance, when you restart after wiping cache/dalvik and you get that screen that says "Android is upgrading" will be whatever color you choose instead of ICS blue. Honestly I can't even remember everything that this changes, but I know it is another must have to complete any theme.

Open framework-res>>res>>values>>colors.xml

Look at line 9 and 10. I always change the hex on both lines to the color I'm using in the theme.


<color name="holo_blue_light">#ff33b5e5</color>
<color name="holo_blue_dark">#ff0099cc</color>




_________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________



Colors in Contacts



This will change the color of the text and dividers in the contacts list.

Open Contacts>>res>>values>>colors.xml

These are all of the lines that I change.

Line 8
<color name="quickcontact_tab_indicator">#ffcd0000</color>


Line 19
<color name="people_app_theme_color">#ffcd0000</color>


Line 24
<color name="action_bar_button_text_color">#ffcd0000</color>


Lines 30 and 31
<color name="sd_title_divider">#ffcd0000</color>
<color name="dialpad_highlight_color">#ffcd0000</color>



Now open Contacts>>res>>values>>styles.xml

Line 39
<item name="call_log_primary_text_color">#ffcd0000</item>


Line 43
<item name="call_log_header_color">#ffcd0000</item>


Line 47
<item name="call_log_voicemail_status_action_text_color">#ffcd0000</item>

Line 54
<item name="call_log_primary_text_color">#ffcd0000</item>


Line 58
<item name="call_log_header_color">#ffcd0000</item>


Line 62
<item name="call_log_voicemail_status_action_text_color">#ffcd0000</item>





_________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________



Colors in Phone


Open Phone>>res>>values>>colors.xml

Edit these lines:

Line 10
<color name="incall_phonenumber_color">#ffcd0000</color>


Line 13
<color name="call_banner_divider">#ffcd0000</color>


Now open Phone>>res>>values>>styles.xml

Line 42, 52, 56, 114, and 146 should all look like this:
<item name="android:textColor">#ffcd0000</item>




____________________________________________
_________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________



LatinIME-Letters on keyboard


This edit will change the letters on the keyboard from white to you choice of color.

Open LatinIME>>res>>values>>styles.xml

Line 65

<style name="LatinKeyboard">
<item name="autoCorrectionSpacebarLedEnabled">@bool/config_auto_correction_spacebar_led_enabled</item>
<item name="spacebarTextColor">#ffcd0000</item>
<item name="spacebarTextShadowColor">#80000000</item>


Line 83-93
<item name="keyTextColor">#ffcd0000</item>
<item name="keyTextInactivatedColor">#ffcd0000</item>
<item name="keyHintLetterColor">#80cd0000</item>
<item name="keyHintLabelColor">#e0cd0000</item>
<item name="keyUppercaseLetterInactivatedColor">#66cd0000</item>
<item name="keyUppercaseLetterActivatedColor">#cccd0000</item>
<item name="keyPreviewLayout">@layout/key_preview</item>
<item name="keyPreviewBackground">@drawable/keyboard_key_feedback</item>
<item name="keyPreviewLeftBackground">@null</item>
<item name="keyPreviewRightBackground">@null</item>
<item name="keyPreviewTextColor">#ffcd0000</item>


Line 216-229
<style name="KeyboardView.IceCreamSandwich" parent="@style/KeyboardView">
<item name="android:background">@drawable/keyboard_background_holo</item>
<item name="keyBackground">@drawable/btn_keyboard_key_ics</item>
<item name="keyTextInactivatedColor">#66cd0000</item>
<item name="keyHintLetterColor">#ffcd0000</item>
<item name="keyHintLabelColor">#a0cd0000</item>
<item name="keyUppercaseLetterInactivatedColor">#66cd0000</item>
<item name="keyUppercaseLetterActivatedColor">#ffcd0000</item>
<item name="keyPreviewBackground">@drawable/keyboard_key_feedback_ics</item>
<item name="keyPreviewLeftBackground">@drawable/keyboard_key_feedback_left_ics</item>
<item name="keyPreviewRightBackground">@drawable/keyboard_key_feedback_right_ics</item>
<item name="keyPreviewBackgroundWidth">@dimen/keyboard_key_feedback_background_holo_width</item>
<item name="keyPreviewBackgroundHeight">@dimen/keyboard_key_feedback_background_holo_height</item>
<item name="keyPreviewTextColor">#ffcd0000</item>



IMPORTANT NOTE!!! When you compile LatinIME and open up the apk that is in the dist folder and are ready to drag and drop your files back in to the original apk you CAN NOT drag and drop the res folder! You MUST open the res folder and drag-n-drop only the drawable-hdpi folder or else you will get force closes.

Of course if you only made xml edits this doesn't apply since those will be in resources.arsc




_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________



Remove Carrier Label/Change Carrier Label Text



Pretty self explanatory. This removes the "Verizon Wireless" text from the lock screen and the status bar pull down. I was actually really surprised when I found how easy this was. Using this method you can also put your own custom text in place of it. Only one catch, though, it can only be 16 characters long.

Open framework-res>>res>>xml>>eri.xml

The edits will be made on lines 9, 21, and 22. The process is the same for each line.

If you want to remove the carrier label, then you will replace the text with 16 spaces. **You must put 16 spaces!!!

It will go from looking like this:


<EriInfo RoamingIndicator="76" IconIndex="0" IconMode="0" EriText="Verizon Wireless" CallPromptId="0" AlertId="0" DataServiceSupport="1" />


To looking like this:

<EriInfo RoamingIndicator="76" IconIndex="0" IconMode="0" EriText=" " CallPromptId="0" AlertId="0" DataServiceSupport="1" />




If you want custom text displayed then remember as I stated, MUST be 16 characters exactly. So if it is less than that then you will put spaces before and after the text to fill it out.

So if I want to add the text "ARCTIC HD" then it should look like this when I'm finished.

<EriInfo RoamingIndicator="76" IconIndex="0" IconMode="0" EriText=" Arctic HD " CallPromptId="0" AlertId="0" DataServiceSupport="1" />


Notice I put spaces before and after to keep it centered properly when it displays.





_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________



Custom Image on Status Bar Pull Down


This is one that I had wanted to learn since I started making themes and I'm so glad I finally did it.


Open SystemUI>>res>>values>>drawable.xml

Delete line 12. It should be this line:
<item type="drawable" name="notification_tracking_bg">#d8000000</item>

Now you need to create the image you want to use for the background.The size is not all that important, because it will be stretched to fit if it is smaller than it needs to be.
The size of the image I used was 540x600. It seemed to fit perfect for me without stretching the image and making it look distorted from my original image.

Now you need to save this image with the name notification_tracking_bg.png
Place this image in SystemUI>>res>>drawable-hdpi and you're done.


Special note: Not important but the reason this works is because if you open SystemUI>>res>>layout>>status_bar_tracking.xml you will see that on line 4 it is looking for something drawable named notification_tracking_bg.





Coming soon:
  • More common useful xml edits

  • mattlgroff, lownslow200sx, adamjmtz and 6 others like this

#2 Alex.Abraham

Alex.Abraham

    Droid Master

  • Superuser
  • 477 posts
  • Twitter:aabraham123456
  • Google+:aabraham123456@gmail.com
  • LocationNew Jersey

Posted 28 September 2012 - 02:19 AM

Great write-up DSG!!!!

I remember when I started theming these were incredibly annoying problems and it took me a really long time to figure out how to fix them :P
Posted Image

#3 Thach

Thach

    Motorola Fanboy

  • Administrator
  • 2,364 posts
  • Twitter:thach2639
  • Google+:Thach26
  • LocationGrand Forks ND
  • Current Device(s):OG Droid, Droid X, Droid X2, Droid Razr, Droid Bionic, Droid Xyboard 8.2, Nexus 7

Posted 28 September 2012 - 02:49 AM

OK after glancing through this, I think inlay be comfortable enough to give it a try and make my first theme. Thanks so much for this.

Sent from my Motorola Xyboard

Thach%20Admin%20device%20list.png


#4 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 28 September 2012 - 09:26 PM

Updated with how to add a custom/remove a carrier label and how to add a custom background for the status bar pull down.

#5 usmcamgrimm

usmcamgrimm

    Berserker

  • Developer
  • 958 posts
  • Twitter:@usmcamgrimm
  • LocationMassillon, OH
  • Current Device(s):VZW G3

Posted 08 October 2012 - 01:33 AM

Thanks! I'm looking to incorporate some of this stuff already.

  Exodus-Sig%204.png


#6 tucstwo

tucstwo

    www.drdevs.com

  • Administrator
  • 14,435 posts
  • Twitter:tucstwo
  • Google+:tucstwo@gmail.com
  • LocationNJ
  • Current Device(s):LG G3 VS985, Nexus 7 (flo)

Posted 08 October 2012 - 04:07 PM

WOW. What a write up!

Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!


#7 james

james

    Droid Master

  • Members
  • PipPipPip
  • 620 posts
  • Locationsouthern cali
  • Current Device(s):LG G2 Verizon

Posted 08 October 2012 - 04:19 PM

wow alot of great information thanks for putting this together for us beginners

#8 Guest_24v_*

Guest_24v_*
  • Guests

Posted 09 October 2012 - 03:56 AM

This is awesome!

#9 usmcamgrimm

usmcamgrimm

    Berserker

  • Developer
  • 958 posts
  • Twitter:@usmcamgrimm
  • LocationMassillon, OH
  • Current Device(s):VZW G3

Posted 10 October 2012 - 04:01 PM

I mistakenly changed the colors in SystemUI>res>values>colors instead of the one in framework-res. It didn't make any noticeable changes. Any idea what that one does?

  Exodus-Sig%204.png


#10 Guest_24v_*

Guest_24v_*
  • Guests

Posted 10 October 2012 - 04:03 PM

Which line did you change?

#11 usmcamgrimm

usmcamgrimm

    Berserker

  • Developer
  • 958 posts
  • Twitter:@usmcamgrimm
  • LocationMassillon, OH
  • Current Device(s):VZW G3

Posted 10 October 2012 - 04:18 PM

<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="status_bar_recents_app_label_color">#ff0033ff</color>
<color name="notification_list_shadow_top">#ff0033ff</color>
</resources>

It's the second one I don't see...recent apps labels changed; I don't normally look at those. I don't see any difference in the notification list.

  Exodus-Sig%204.png


#12 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 10 October 2012 - 05:40 PM

#ff0033ff
#ff0033ff


It's the second one I don't see...recent apps labels changed; I don't normally look at those. I don't see any difference in the notification list.


I believe that is the label color for when you long press the home button to pull up all of your recently opened apps.

Sent from my DROID RAZR using Tapatalk 2

#13 usmcamgrimm

usmcamgrimm

    Berserker

  • Developer
  • 958 posts
  • Twitter:@usmcamgrimm
  • LocationMassillon, OH
  • Current Device(s):VZW G3

Posted 12 October 2012 - 10:43 PM

I changed the carrier text and flashed...worked fine. Then I made a few more changes, flashed, and it went back to the Verizon Wireless text. After a reboot, I noticed the changes were back. Is this something within the xml itself that I should change? Or is it in the way the xml is read at startup?

  Exodus-Sig%204.png


#14 BytecodeMe

BytecodeMe

    Private Pile

  • Superuser
  • 2,004 posts
  • Twitter:@BytecodeMe
  • LocationSan Diego, California
  • Current Device(s):Nexus 4, Droid Razr Maxx HD

Posted 13 October 2012 - 04:50 AM

I changed the carrier text and flashed...worked fine. Then I made a few more changes, flashed, and it went back to the Verizon Wireless text. After a reboot, I noticed the changes were back. Is this something within the xml itself that I should change? Or is it in the way the xml is read at startup?


Maybe how the phone is reading the caches? Does the updater script wipe the caches?

Sent from my DROID RAZR using Tapatalk 2

byte3plusrainbowsmallllllllller.png


#15 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 13 October 2012 - 04:27 PM

I changed the carrier text and flashed...worked fine. Then I made a few more changes, flashed, and it went back to the Verizon Wireless text. After a reboot, I noticed the changes were back. Is this something within the xml itself that I should change? Or is it in the way the xml is read at startup?


I haven't had that problem. Only time that happened to me was by copying an unmodified file back in to the theme. Double check your work to make sure it wasn't something simple like that.

Sent from my DROID RAZR using Tapatalk 2

#16 AscensionX

AscensionX

    Code Breaker

  • Developer
  • 363 posts
  • Current Device(s):Motorola Droid Razr Maxx, Droid Razr Maxx HD, Nexus 7, Samsung Galaxy SIII

Posted 14 October 2012 - 11:03 AM

I changed the carrier label text but is didn't do anything, still says Verizon Wireless even though it's changed. Added it to me new rom so all the wipes were done on initial install.
Any ideas???

#17 usmcamgrimm

usmcamgrimm

    Berserker

  • Developer
  • 958 posts
  • Twitter:@usmcamgrimm
  • LocationMassillon, OH
  • Current Device(s):VZW G3

Posted 14 October 2012 - 11:33 AM

Did you make sure you only have 16 characters? And double check to make sure you didn't change anything accidentally? That happened to me also and a reboot fixed it.

  Exodus-Sig%204.png


#18 AscensionX

AscensionX

    Code Breaker

  • Developer
  • 363 posts
  • Current Device(s):Motorola Droid Razr Maxx, Droid Razr Maxx HD, Nexus 7, Samsung Galaxy SIII

Posted 14 October 2012 - 11:45 AM

Did you make sure you only have 16 characters? And double check to make sure you didn't change anything accidentally? That happened to me also and a reboot fixed it.

Everything looks in order. I'll keep messing with it. Thanks :)

#19 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 14 October 2012 - 01:00 PM

Everything looks in order. I'll keep messing with it. Thanks


What folders are you moving from the apk created in the dist folder to the original apk?

That particular xml is not held in the resources.arsc file. Be sure you are either moving the xml folder or the whole res folder.

Also i don't believe this mod works on aokp or cm9/10 roms. I have not tested myself though.

Sent from my DROID RAZR using Tapatalk 2

#20 AscensionX

AscensionX

    Code Breaker

  • Developer
  • 363 posts
  • Current Device(s):Motorola Droid Razr Maxx, Droid Razr Maxx HD, Nexus 7, Samsung Galaxy SIII

Posted 14 October 2012 - 01:05 PM

What folders are you moving from the apk created in the dist folder to the original apk?

That particular xml is not held in the resources.arsc file. Be sure you are either moving the xml folder or the whole res folder.

Also i don't believe this mod works on aokp or cm9/10 roms. I have not tested myself though.

Sent from my DROID RAZR using Tapatalk 2

Moving the framework-res.apk from the /dist folder and using it on a rom i'm developing.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users