Theming Guide for changing system text settings.

OP
thebowers

thebowers

Premium Member
Premium Member
Theme Developer
Joined
Nov 24, 2009
Messages
2,545
Reaction score
1
Location
Iowa
Try another framework from another rom. Also decompile the .apk and recompile without doing changes first. That will tell you if everything is alright before editing.

I have the same issues with LFY 1.7 and thus will not theme it until the dev does something about it.
 

skylordusa1

Member
Joined
Aug 19, 2010
Messages
204
Reaction score
0
Try another framework from another rom. Also decompile the .apk and recompile without doing changes first. That will tell you if everything is alright before editing.

I have the same issues with LFY 1.7 and thus will not theme it until the dev does something about it.

Cool thank you Bowers. I will give that shot and see what I get. I cant thank you enough for all your hard work and willingness to help out noobs like myself.
 

skylordusa1

Member
Joined
Aug 19, 2010
Messages
204
Reaction score
0
Another quick question. I saw that it was discussed but just want to make sure I am reading it right. Say I do find a rom (call it rom A)that I can decompile and compile with no errors/issues. But I am using liquids rom on my phone (call it rom b). I then decompile rom A and make my changes to the styles.xml file. I then compile it. After It is compiled do I need to sign it and then take the edited styles.xml file out of rom A and then replace the styles.xml in rom b with it? Or do I not even need to sign it. I can just compile rom a and then replace the styles.xml file within rom b with the edited one from rom a. If that makes any sense.
 

kook

Premium Member
Premium Member
Theme Developer
Joined
Dec 29, 2009
Messages
2,036
Reaction score
1
Another quick question. I saw that it was discussed but just want to make sure I am reading it right. Say I do find a rom (call it rom A)that I can decompile and compile with no errors/issues. But I am using liquids rom on my phone (call it rom b). I then decompile rom A and make my changes to the styles.xml file. I then compile it. After It is compiled do I need to sign it and then take the edited styles.xml file out of rom A and then replace the styles.xml in rom b with it? Or do I not even need to sign it. I can just compile rom a and then replace the styles.xml file within rom b with the edited one from rom a. If that makes any sense.

Compile Rom A AND sign it. Then take the edited images from Rom B and drag them into Rom A using 7-zip. 7-zip won't break the signing.
 
OP
thebowers

thebowers

Premium Member
Premium Member
Theme Developer
Joined
Nov 24, 2009
Messages
2,545
Reaction score
1
Location
Iowa
Another quick question. I saw that it was discussed but just want to make sure I am reading it right. Say I do find a rom (call it rom A)that I can decompile and compile with no errors/issues. But I am using liquids rom on my phone (call it rom b). I then decompile rom A and make my changes to the styles.xml file. I then compile it. After It is compiled do I need to sign it and then take the edited styles.xml file out of rom A and then replace the styles.xml in rom b with it? Or do I not even need to sign it. I can just compile rom a and then replace the styles.xml file within rom b with the edited one from rom a. If that makes any sense.

Compile Rom A AND sign it. Then take the edited images from Rom B and drag them into Rom A using 7-zip. 7-zip won't break the signing.

But he is wanting to go the other way around. Taking styles.xml which when compiled is part of resources.arsc from Rom A and putting it in non decompiled Rom B. You can try this, but I think I have tried this and got boot loops.
 

kook

Premium Member
Premium Member
Theme Developer
Joined
Dec 29, 2009
Messages
2,036
Reaction score
1
But he is wanting to go the other way around. Taking styles.xml which when compiled is part of resources.arsc from Rom A and putting it in non decompiled Rom B. You can try this, but I think I have tried this and got boot loops.

I don't understand why he would want to do this. What is the reasoning?

I'm not being a d**k....serious question.
 

skylordusa1

Member
Joined
Aug 19, 2010
Messages
204
Reaction score
0
Another quick question. I saw that it was discussed but just want to make sure I am reading it right. Say I do find a rom (call it rom A)that I can decompile and compile with no errors/issues. But I am using liquids rom on my phone (call it rom b). I then decompile rom A and make my changes to the styles.xml file. I then compile it. After It is compiled do I need to sign it and then take the edited styles.xml file out of rom A and then replace the styles.xml in rom b with it? Or do I not even need to sign it. I can just compile rom a and then replace the styles.xml file within rom b with the edited one from rom a. If that makes any sense.

Compile Rom A AND sign it. Then take the edited images from Rom B and drag them into Rom A using 7-zip. 7-zip won't break the signing.

hahahhahah I knew I would be confused. I appreciate the help but I may just be a lost cause. You said take the edited images from Rom B which is liquids rom. So I would take everything out of his framework-res.apk and place it into my newly compiled framework-res.apk except for styles.xml because that is the one that I changed and want to keep?
 
OP
thebowers

thebowers

Premium Member
Premium Member
Theme Developer
Joined
Nov 24, 2009
Messages
2,545
Reaction score
1
Location
Iowa
But he is wanting to go the other way around. Taking styles.xml which when compiled is part of resources.arsc from Rom A and putting it in non decompiled Rom B. You can try this, but I think I have tried this and got boot loops.

I don't understand why he would want to do this. What is the reasoning?

I'm not being a d**k....serious question.

He is looking for a work around since he can't get Rom B to recompile.
 

skylordusa1

Member
Joined
Aug 19, 2010
Messages
204
Reaction score
0
Also just another question about part 2. below in the OP.

2. Download and extract Apk Manager. I usually place this in the tools directory of the Android SDK. If you do this you need to set the environment path for the directory for aapt.exe of apktool.jar to work correctly.

I downloaded the apk manager.zip. I extracted it to the tools directory of the android sdk. Now I see that aapt.exe and apktool.jar are in the other folder of apkmanager. When you say set the environment path do you mean just have the c:\androidsdk\tools directory set in the environment path which I already have. Or do I have to take it one step further and put c:\androidsdk\tools\other in the path as well?
 
OP
thebowers

thebowers

Premium Member
Premium Member
Theme Developer
Joined
Nov 24, 2009
Messages
2,545
Reaction score
1
Location
Iowa
Mine is just set to the tools directory. Then again I have aapt.exe in there as well, since I used apktool.jar before using apk manager.

The way to test it is to take a stock app like calculator (who really wants to theme it, lol). Decompile it and recompile. If you don't get errors your good. If you get an error about java and aapt.exe you need to work on the path.
 

kook

Premium Member
Premium Member
Theme Developer
Joined
Dec 29, 2009
Messages
2,036
Reaction score
1
Also just another question about part 2. below in the OP.

2. Download and extract Apk Manager. I usually place this in the tools directory of the Android SDK. If you do this you need to set the environment path for the directory for aapt.exe of apktool.jar to work correctly.

I downloaded the apk manager.zip. I extracted it to the tools directory of the android sdk. Now I see that aapt.exe and apktool.jar are in the other folder of apkmanager. When you say set the environment path do you mean just have the c:\androidsdk\tools directory set in the environment path which I already have. Or do I have to take it one step further and put c:\androidsdk\tools\other in the path as well?

I just did the first.
 

skylordusa1

Member
Joined
Aug 19, 2010
Messages
204
Reaction score
0
Alright awesome. Thanks guys for your help. I will give this a shot tonight to see if I can get it to work. I am all set with changing the app icons and png files so I really want to get into the text colors and stuff. Hopefully with your help I can get this figured out.
 

kook

Premium Member
Premium Member
Theme Developer
Joined
Dec 29, 2009
Messages
2,036
Reaction score
1
Alright awesome. Thanks guys for your help. I will give this a shot tonight to see if I can get it to work. I am all set with changing the app icons and png files so I really want to get into the text colors and stuff. Hopefully with your help I can get this figured out.

Took a lot of time and frustration for me to get it. Lots of people (including TheBowers) helped me out. Good luck bud.
 

gflam

Developer
Developer
Theme Developer
Joined
Jun 14, 2010
Messages
1,900
Reaction score
29
Location
Jersey
Sorry to bother but i'm new to this all as well. I've been looking through the androidmanifest.xml file like i was told and i thought i figured it out but got slightly confused.

This was my method below as well as the xmls i looked at you can just skip to the ** at the end if you don't like reading.

**I'm working with the calculator.apk**

androidmanifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="8" android:versionName="2.2" package="com.android.calculator2"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
<original-package android:name="com.android.calculator2" />
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:theme="@android:style/Theme.Black.NoTitleBar" android:name="Calculator">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

So looking through the manifest i see the theme is Theme.Black.NoTitleBar (in bold) and it says style right before so i figure the theme is controlled by the styles.xml in the values folder inside the res folder correct?

I then go to the styles.xml

which looks like this

styles.xml
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<style name="button_style">
<item name="android:textSize">40.0dip</item>
<item name="android:background">@drawable/button</item>
<item name="android:focusable">true</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_marginLeft">1.0dip</item>
<item name="android:layout_weight">1.0</item>
</style>
<style name="digit_button_style" parent="@style/button_style">
<item name="android:background">@drawable/blue_button</item>
</style>
<style name="button_small_style" parent="@style/button_style">
<item name="android:textSize">30.0dip</item>
</style>
<style name="display_style">
<item name="android:textSize">40.0dip</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">right|center</item>
<item name="android:padding">8.0dip</item>
<item name="android:scrollbars">none</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:maxLines">1</item>
<item name="android:scrollHorizontally">true</item>
</style>
</resources>

Looking at this i see the buttons are controlled by the button.xml and button_blue.xml (also in bold) which makes sense cause the buttons are blue and black and it says they're located in the drawable folder correct?

So i go to the drawable folder and find the two xml's it was talking about


Blue_button.xml
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff071622" android:endColor="#ff253541" android:angle="90.0" />
<corners android:radius="0.0dip" />
</shape>


Button.xml
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff000000" android:endColor="#ff333333" android:angle="90.0" />
<corners android:radius="0.0dip" />
</shape>
Now looking at this is see the blue_button.xml has a start color and end color as well as the button.xml also makes sense cause they buttons seem to be darker at the bottom and lighter at the top on the stock calculator.apk

**So i figure this is finally what controls the button colors i take the start color for example in blue_button.xml which says it's
#ff071622 and i figure it's hex form and the last two numbers represent transparency? so my color is ff0716 which then makes no sense because that's a bright red which the calculator obviously is not.

So i start thinking and i then say forget the first ff and use the 071622 which is a dark blue and looks like my calculator so i say bingo i found it so i change it to something ridiculous like 991622 which should be a red and i do the same for all the other start and end colors.

I then compile it sign it etc no errors and it goes through fine i put it on my phone and nothings changed!?!? so now i have no idea what's wrong and i go and play with everything for a few hours and i just can't get it. Can someone please help explain what i did wrong?**

 
Last edited:

xkape

Premium Member
Premium Member
Theme Developer
Joined
Jul 27, 2010
Messages
3,882
Reaction score
37
Location
OH-IO
How are you putting it on your phone?

I bleieve you need that "ff" on there by the way.
 
Last edited:
Top