Post Reply

[GUIDE][4.4.x] Theming stock android

19th January 2014, 04:23 PM   |  #1  
OP Senior Member
Thanks Meter: 382
 
1,523 posts
Join Date:Joined: Jan 2010
Donate to Me
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 by donjamal; 19th January 2014 at 04:30 PM.
The Following 6 Users Say Thank You to donjamal For This Useful Post: [ View ]
19th January 2014, 04:24 PM   |  #2  
OP Senior Member
Thanks Meter: 382
 
1,523 posts
Join Date:Joined: Jan 2010
Donate to Me
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> <-- this is the overall width of the switch
        <item name="switchPadding">8.0dip</item> <-- with this
        <item name="thumbTextPadding">8.0dip</item> <-- and this, you can change the width of the switch thumb
    </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 by donjamal; 19th January 2014 at 04:29 PM.
The Following 5 Users Say Thank You to donjamal For This Useful Post: [ View ]
19th January 2014, 04:24 PM   |  #3  
OP Senior Member
Thanks Meter: 382
 
1,523 posts
Join Date:Joined: Jan 2010
Donate to Me
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.Light.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> <--- change this color to whatever you want
        <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 by donjamal; 1st February 2014 at 12:47 AM.
The Following 3 Users Say Thank You to donjamal For This Useful Post: [ View ]
19th January 2014, 04:25 PM   |  #4  
OP Senior Member
Thanks Meter: 382
 
1,523 posts
Join Date:Joined: Jan 2010
Donate to Me
reserved 3
The Following User Says Thank You to donjamal For This Useful Post: [ View ]
19th January 2014, 04:31 PM   |  #5  
Senior Member
Flag Craiova
Thanks Meter: 59
 
197 posts
Join Date:Joined: Dec 2012
More
Can't w8 to see how the tutorial is
20th January 2014, 01:22 AM   |  #6  
Icarus1391's Avatar
Senior Member
Flag Panama
Thanks Meter: 119
 
252 posts
Join Date:Joined: Aug 2012
More
Thanks! Was very useful for me.

Sent from my Nexus 4 using Tapatalk
20th January 2014, 12:13 PM   |  #7  
OP Senior Member
Thanks Meter: 382
 
1,523 posts
Join Date:Joined: Jan 2010
Donate to Me
Quote:
Originally Posted by Icarus1391

Thanks! Was very useful for me.

Sent from my Nexus 4 using Tapatalk

no probs. if you did change something, you can throw up a screenie of it, just so we can see
5th March 2014, 12:06 PM   |  #8  
chainsn0w's Avatar
Junior Member
Thanks Meter: 45
 
29 posts
Join Date:Joined: Jan 2014
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
5th March 2014, 07:32 PM   |  #9  
OP Senior Member
Thanks Meter: 382
 
1,523 posts
Join Date:Joined: Jan 2010
Donate to Me
Look for switch, mate, that's what u want to change

Sent from the outer space, delivered by an android using a 4th gen nexus

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Nexus 4 Themes and Apps by ThreadRank