[GUIDE][4.4.x] Theming stock android

Search This thread

donjamal

Senior Member
Hi Everyone,

since i was playing a lot with all these to set them up perfectly (well, as much as i could) and to find different settings and connections, styles what not, i though i share some of my findings. the more i'll fix up in my own stlye, the more i'll add to this post.

i'm not going to write down how to decompile or recompile your apk's, that's something you figure out on your own, i'm just trying to give you some support here.

feel free to donate and/or press the thanks button if you find anything useful here. please bear in mind, i worked hard to figures all these out.

it's also possible that i'm not going to complete this tut.

if you have questions, shoot, i might be able to help but there's no guarantee for that.

have fun!
 
Last edited:

donjamal

Senior Member
Changing the switch:


in framework-res.apk\res\values\styles.xml, change both holo and holo.light Switch CompoundButton

===================================================================================
General:

track is the background of the switch, thumb is the switch itself (that you slide over). TextOn & TextOff are the

strings displayed in both states of the switch. padding is pedding

Code:
 <style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
        <item name="textOn">@string/capital_on</item>
        <item name="textOff">@string/capital_off</item>
        <item name="thumb">@drawable/switch_inner_holo_dark</item>
        <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
        <item name="track">@drawable/switch_track_holo_dark</item>
        <item name="switchMinWidth">96.0dip</item>
        <item name="switchPadding">8.0dip</item>
        <item name="thumbTextPadding">8.0dip</item>
    </style>

======================================================================================================
chaning the track (background):

from res\drawable\ open switch_track_holo_dark and ~_light.xml's

to have a different background for when the switch is in different states, add:

Code:
<item android:state_checked="true" android:drawable="@drawable/switch_bg_on_holo_light" />
- for the switch on
Code:
<item android:state_checked="false" android:drawable="@drawable/switch_bg_on_holo_light" />
- for the switch off

Code:
<item android:drawable="@drawable/switch_bg_holo_light" />
- this is the default background, so if you specify only

off or on states, the rest will be the default.


======================================================================================================
changing width of switch:

Code:
   <style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
        <item name="textOn">@string/capital_on</item>
        <item name="textOff">@string/capital_off</item>
        <item name="thumb">@drawable/switch_inner_holo_dark</item>
        <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
        <item name="track">@drawable/switch_track_holo_dark</item>
        <item name="switchMinWidth">56.0dip</item> [B][COLOR="Red"]<-- this is the overall width of the switch[/COLOR][/B]
        <item name="switchPadding">8.0dip</item> [COLOR="red"][B]<-- with this[/B][/COLOR]
        <item name="thumbTextPadding">8.0dip</item> [COLOR="red"][B]<-- and this, you can change the width of the switch thumb[/B][/COLOR]
    </style>

======================================================================================================
Switch text:

Code:
<style name="Widget.CompoundButton.Switch" parent="@style/Widget.CompoundButton">
        <item name="textOn">@string/capital_on</item>
        <item name="textOff">@string/capital_off</item>
</style>

======================================================================================================
change color of these to make the text disappear (transparent) or change color:

Code:
<style name="TextAppearance.Holo.Widget.Switch" parent="@style/TextAppearance.Holo.Small">
        <item name="textColor">@color/secondary_text_holo_dark</item>
</style>

<style name="TextAppearance.Holo.Light.Widget.Switch" parent="@style/TextAppearance.Holo.Small">
        <item name="textColor">@color/primary_text_holo_dark</item>
</style>

======================================================================================================
 
Last edited:

donjamal

Senior Member
Changing the defaults of Settings to white (holo light):

it's really easy, you just have to change every holo style to holo.light and add the font color of your desire to the different styles in res\values\styles.xml

change every parent "class" that starts with @*android:style/Holo to @*android:style/Holo.Light and, eg:

Code:
parent="@*android:style/Holo.SegmentedButton"

becomes

Code:
parent="@*android:style/Holo.[COLOR="Red"]Light[/COLOR].SegmentedButton"

then add the following line to every style element:

Code:
<item name="android:textColor">#ff545454</item>

except to these styles:
<style name="Transparent">, <style name="setup_wizard_button">, <style name="CryptKeeperBlankTheme"> - here i didn't change holo to holo.light neither (may be worthy to try though), <style name="TextAppearance.Switch"...>, <style name="KeyguardAppWidgetItem">.

where #ff545454 is the hex color code of the color you want to use as the font color. ff at the beginning is android specific, it tells the opacity of the color you select, so in the above case, the original hex color is #545454 (which is gray) but to have a 100% solid color, we need to add ff to the beginning of the hex color code, so it turns into #ff545454. easy peasy

you might have to change all drawables or some of them from _light to _dark, or recolor them in Settings.apk or fw-apk.

you also need to change

Code:
<item name="android:actionBarStyle">@*android:style/Widget.Holo.ActionBar.Solid</item>

to

Code:
<item name="android:actionBarStyle">@*android:style/Widget.Holo.Light.ActionBar.Solid</item>

==========================================================================================================
Changing category header color:

in fw-res.apk\res\values\styles.xml change:

Code:
<style name="Widget.TextView.ListSeparator" parent="@style/Widget.TextView">
        <item name="textSize">14.0sp</item>
        <item name="textStyle">bold</item>
        <item name="textColor">#ffbb0303</item>[COLOR="Red"] <--- change this color to whatever you want[/COLOR]
        <item name="gravity">center_vertical</item>
        <item name="background">@drawable/dark_header_dither</item>
        <item name="layout_width">fill_parent</item>
        <item name="layout_height">wrap_content</item>
        <item name="paddingStart">8.0dip</item>
</style>

===========================================================================================================================================

theming GoogleDeskClock and having issues with the stopwatch icon (same icon used in status bar when stopwatch is running as for the selected (activated) tab. to fix it, follow this:

Create a black (or whatever color you used) copy of the stopwatch activated icon (ic_tab_stopwatch_activated), name it as ic_tab_stopwatch_activated_b.png in the same folder and change the code in res\drawable\stopwatch_tab.xml the following lines from ic_tab_stopwatch_activated to ic_tab_stopwatch_activated_b:

Code:
    <item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />
    <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />
    <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />
    <item android:state_selected="true" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />
 
Last edited:
I

Icarus1391

Guest
Thanks! Was very useful for me.

Sent from my Nexus 4 using Tapatalk
 

chainsn0w

Member
Jan 30, 2014
29
49
www.chains0w.blogspot.com
holo.light settings framework S4 i9505 on 4.4.2 kitkat xxufnb8

i want to make holo light changes to whole secsettings na framework on S4 i9505 running on 4.4.2 german B8 stock odexed rom

at your guide Changing the switch:


in framework-res.apk\res\values\styles.xml, change both holo and holo.light Switch CompoundButton


i dont have the string <style name="Widget.Holo.CompoundButton.Switch"

instead i have <style name="Widget.CompoundButton" parent="@style/Widget">
<item name="textAppearance">?textAppearance</item>
<item name="textColor">?textColorPrimaryDisableOnly</item>
<item name="gravity">start|center</item>
<item name="focusable">true</item>
<item name="clickable">true</item>



maybe the guide is nexus related but you didnt writed in the details, i would apreciate i you can guide me according to touchwiz xmls

i have pressed thanks button already
 

FullWipe

Senior Member
Jul 3, 2014
943
1,996
Milano
Hi mate, I would like to completely get rid of the on/off switch
and replace it with another button on Android L style....

How can I do?

Can I make it transparent in this way to make it disappear?

Code:
<style name="TextAppearance.Holo.Widget.Switch" parent="@style/TextAppearance.Holo.Small">
<item name="textColor">[B]#00000000[/B]</item>
</style>
<style name="TextAppearance.Holo.Light.Widget.Switch" parent="@style/TextAppearance.Holo.Small">
<item name="textColor">[B]#00000000[/B]</item>
</style>

Tnx in advance! :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Hi Everyone,

    since i was playing a lot with all these to set them up perfectly (well, as much as i could) and to find different settings and connections, styles what not, i though i share some of my findings. the more i'll fix up in my own stlye, the more i'll add to this post.

    i'm not going to write down how to decompile or recompile your apk's, that's something you figure out on your own, i'm just trying to give you some support here.

    feel free to donate and/or press the thanks button if you find anything useful here. please bear in mind, i worked hard to figures all these out.

    it's also possible that i'm not going to complete this tut.

    if you have questions, shoot, i might be able to help but there's no guarantee for that.

    have fun!
    5
    Changing the switch:


    in framework-res.apk\res\values\styles.xml, change both holo and holo.light Switch CompoundButton

    ===================================================================================
    General:

    track is the background of the switch, thumb is the switch itself (that you slide over). TextOn & TextOff are the

    strings displayed in both states of the switch. padding is pedding

    Code:
     <style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
            <item name="textOn">@string/capital_on</item>
            <item name="textOff">@string/capital_off</item>
            <item name="thumb">@drawable/switch_inner_holo_dark</item>
            <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
            <item name="track">@drawable/switch_track_holo_dark</item>
            <item name="switchMinWidth">96.0dip</item>
            <item name="switchPadding">8.0dip</item>
            <item name="thumbTextPadding">8.0dip</item>
        </style>

    ======================================================================================================
    chaning the track (background):

    from res\drawable\ open switch_track_holo_dark and ~_light.xml's

    to have a different background for when the switch is in different states, add:

    Code:
    <item android:state_checked="true" android:drawable="@drawable/switch_bg_on_holo_light" />
    - for the switch on
    Code:
    <item android:state_checked="false" android:drawable="@drawable/switch_bg_on_holo_light" />
    - for the switch off

    Code:
    <item android:drawable="@drawable/switch_bg_holo_light" />
    - this is the default background, so if you specify only

    off or on states, the rest will be the default.


    ======================================================================================================
    changing width of switch:

    Code:
       <style name="Widget.Holo.CompoundButton.Switch" parent="@style/Widget.Holo.CompoundButton">
            <item name="textOn">@string/capital_on</item>
            <item name="textOff">@string/capital_off</item>
            <item name="thumb">@drawable/switch_inner_holo_dark</item>
            <item name="switchTextAppearance">@style/TextAppearance.Holo.Widget.Switch</item>
            <item name="track">@drawable/switch_track_holo_dark</item>
            <item name="switchMinWidth">56.0dip</item> [B][COLOR="Red"]<-- this is the overall width of the switch[/COLOR][/B]
            <item name="switchPadding">8.0dip</item> [COLOR="red"][B]<-- with this[/B][/COLOR]
            <item name="thumbTextPadding">8.0dip</item> [COLOR="red"][B]<-- and this, you can change the width of the switch thumb[/B][/COLOR]
        </style>

    ======================================================================================================
    Switch text:

    Code:
    <style name="Widget.CompoundButton.Switch" parent="@style/Widget.CompoundButton">
            <item name="textOn">@string/capital_on</item>
            <item name="textOff">@string/capital_off</item>
    </style>

    ======================================================================================================
    change color of these to make the text disappear (transparent) or change color:

    Code:
    <style name="TextAppearance.Holo.Widget.Switch" parent="@style/TextAppearance.Holo.Small">
            <item name="textColor">@color/secondary_text_holo_dark</item>
    </style>
    
    <style name="TextAppearance.Holo.Light.Widget.Switch" parent="@style/TextAppearance.Holo.Small">
            <item name="textColor">@color/primary_text_holo_dark</item>
    </style>

    ======================================================================================================
    3
    Changing the defaults of Settings to white (holo light):

    it's really easy, you just have to change every holo style to holo.light and add the font color of your desire to the different styles in res\values\styles.xml

    change every parent "class" that starts with @*android:style/Holo to @*android:style/Holo.Light and, eg:

    Code:
    parent="@*android:style/Holo.SegmentedButton"

    becomes

    Code:
    parent="@*android:style/Holo.[COLOR="Red"]Light[/COLOR].SegmentedButton"

    then add the following line to every style element:

    Code:
    <item name="android:textColor">#ff545454</item>

    except to these styles:
    <style name="Transparent">, <style name="setup_wizard_button">, <style name="CryptKeeperBlankTheme"> - here i didn't change holo to holo.light neither (may be worthy to try though), <style name="TextAppearance.Switch"...>, <style name="KeyguardAppWidgetItem">.

    where #ff545454 is the hex color code of the color you want to use as the font color. ff at the beginning is android specific, it tells the opacity of the color you select, so in the above case, the original hex color is #545454 (which is gray) but to have a 100% solid color, we need to add ff to the beginning of the hex color code, so it turns into #ff545454. easy peasy

    you might have to change all drawables or some of them from _light to _dark, or recolor them in Settings.apk or fw-apk.

    you also need to change

    Code:
    <item name="android:actionBarStyle">@*android:style/Widget.Holo.ActionBar.Solid</item>

    to

    Code:
    <item name="android:actionBarStyle">@*android:style/Widget.Holo.Light.ActionBar.Solid</item>

    ==========================================================================================================
    Changing category header color:

    in fw-res.apk\res\values\styles.xml change:

    Code:
    <style name="Widget.TextView.ListSeparator" parent="@style/Widget.TextView">
            <item name="textSize">14.0sp</item>
            <item name="textStyle">bold</item>
            <item name="textColor">#ffbb0303</item>[COLOR="Red"] <--- change this color to whatever you want[/COLOR]
            <item name="gravity">center_vertical</item>
            <item name="background">@drawable/dark_header_dither</item>
            <item name="layout_width">fill_parent</item>
            <item name="layout_height">wrap_content</item>
            <item name="paddingStart">8.0dip</item>
    </style>

    ===========================================================================================================================================

    theming GoogleDeskClock and having issues with the stopwatch icon (same icon used in status bar when stopwatch is running as for the selected (activated) tab. to fix it, follow this:

    Create a black (or whatever color you used) copy of the stopwatch activated icon (ic_tab_stopwatch_activated), name it as ic_tab_stopwatch_activated_b.png in the same folder and change the code in res\drawable\stopwatch_tab.xml the following lines from ic_tab_stopwatch_activated to ic_tab_stopwatch_activated_b:

    Code:
        <item android:state_focused="true" android:state_pressed="false" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />
        <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />
        <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />
        <item android:state_selected="true" android:drawable="@drawable/ic_tab_stopwatch_activated_b" />