[DISCUSS] General Questions/Problems with Theming

etoy

Senior Member
Dec 21, 2009
1,814
862
0
hi there. i tried to decompile SystemUI.apk from latest nightly #92 but i have this error:

Code:
-------------------------------------------------------------------------- 
|04/06/2011 -- 21:35:55,31| 
-------------------------------------------------------------------------- 
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
Impossibile trovare C:\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Impossibile trovare C:\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\etoy\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a3
	at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
	at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
	at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
	at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown Source)
	at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
	at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown Source)
	at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
	at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)
	at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)
	at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)
	at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)
	at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)
	at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)
	at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
	at brut.androlib.res.AndrolibResources.decode(Unknown Source)
	at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
	at brut.androlib.ApkDecoder.decode(Unknown Source)
	at brut.apktool.Main.cmdDecode(Unknown Source)
	at brut.apktool.Main.main(Unknown Source)
what's up? i'm new at theming,i use apk_manager 4.9 with the apktool attached by sonnysekhon one page back.
 

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
For SystemUI to decompile properly, you may have to install the framework of the ROM you are trying to create a theme for. Try this in cmd:

Code:
java -jar apktool.jar if <PATH_TO_YOUR>/framework-res.apk
 
  • Like
Reactions: etoy

etoy

Senior Member
Dec 21, 2009
1,814
862
0
thanks a lot,it worked fine! no errors when decompiling SystemUI.apk now,but i'm stuck in editing the text color..

what do i have to edit exactly to make the notification parts black with white text? like in your "lucid" theme

here's my actual situation


i only miss to change that light grey notification square to black and to change the text color from black and grey to white,then i'm done! :)
 
Last edited:

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
thanks a lot,it worked fine! no errors when decompiling SystemUI.apk now,but i'm stuck in editing the text color..

what do i have to edit exactly to make the notification parts black with white text? like in your "lucid" theme


i only miss to change that light grey notification square to black and to change the text color from black and grey to white,then i'm done! :)
You have to edit status_bar_latest_event_content.xml in framework/res/drawable.
Not sure about the exact line but you need to add android:textColor="#ffffffff" to make the text white. Also in res/drawable-hdpi, change status_bar_item_background_normal.9 to a dark background.
 
  • Like
Reactions: etoy

dreamsforgotten

Senior Member
May 4, 2010
5,077
2,522
0
Louisiana
You have to edit status_bar_latest_event_content.xml in framework/res/drawable.
Not sure about the exact line but you need to add android:textColor="#ffffffff" to make the text white. Also in res/drawable-hdpi, change status_bar_item_background_normal.9 to a dark background.
Ticker text is the scrolling words at the top left when you get a text, clock is in smali, notifications are in the status bar expanded xml but there is no color codes in the code native. You just add the android: color="ffxxxxxx" in somewhere before the android id. Use a line of code that has it as a guide. Change the ongoing notifications notification title etc

Sent from my Nexus S 4G using Tapatalk
 
  • Like
Reactions: etoy

etoy

Senior Member
Dec 21, 2009
1,814
862
0
wow,thanks to both of you! i'm doing some experiments,it seems to quite work.

that's my actual progress:

i have to remove that grey separator between notifications and there's some more black text appearing sometime, i didn't recognize it yet but it's not impossible to do :)

i also accidentally made the "In Corso" carrier text white,now i have to also find where to make the carrier name "I WIND" white too (or neon green maybe :D).

it does only interest me to change the text colors,all i need is in status_bar_latest_event_content.xml and status_bar_expanded.xml,am i right?
 
Last edited:

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
wow,thanks to both of you! i'm doing some experiments,it seems to quite work.

that's my actual progress:

i have to remove that grey separator between notifications and there's some more black text appearing sometime, i didn't recognize it yet but it's not impossible to do :)

i also accidentally made the "In Corso" carrier text white,now i have to also find where to make the carrier name "I WIND" white too (or neon green maybe :D).

it does only interest me to change the text colors,all i need is in status_bar_latest_event_content.xml and status_bar_expanded.xml,am i right?
For the carrier text color, in layout/status_bar_expanded.xml,


change

Code:
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="?android:textAppearanceLarge" android:textColor="#ffdfdfdf" android:layout_gravity="center_vertical" android:paddingLeft="4.0dip" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
to

Code:
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="?android:textAppearanceLarge" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:paddingLeft="4.0dip" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
To get rid of the grey divider, in SystemUI/res/drawable-hdpi, change divider_horizontal_light_opaque.9 to a transparent image.
 

etoy

Senior Member
Dec 21, 2009
1,814
862
0
hi...it's me again. first of all,thank you guys again,you're really helping me with my theme. i didn't have a clue on how to edit those infamous xml's before! :)

i sorted out how to edit the music "now playing" notification part by myself..i'm slowly understanding how it works.

i tried to fix the downloadprovider.apk too, to make the text white and it's ok,but the background is crap and i don't know how to change it into a plain black too.

also,the progress bar is that yellow-orangeish and i'd like to make it neon green too.

last thing (for now :p),do you know if there's some "standard" hex code for neon green? i made some tests but i can't find the exact one that everyone uses.

that's my last progress:


p.s. imho the full black pulldown is awesome on amoled screen! far better than transparent one :)
 
Last edited:

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
hi...it's me again. first of all,thank you guys again,you're really helping me with my theme. i didn't have a clue on how to edit those infamous xml's before! :)

i sorted out how to edit the music "now playing" notification part by myself..i'm slowly understanding how it works.

i tried to fix the downloadprovider.apk too, to make the text white and it's ok,but the background is crap and i don't know how to change it into a plain black too.

also,the progress bar is that yellow-orangeish and i'd like to make it neon green too.

last thing (for now :p),do you know if there's some "standard" hex code for neon green? i made some tests but i can't find the exact one that everyone uses.

that's my last progress:

p.s. imho the full black pulldown is awesome on amoled screen! far better than transparent one :)
For the progressbar, put the following code in framework/drawable/progress_horizontal.xml. This is Gingerbread green but you can tweak it to your liking.

About the other issue, editing download provider xmls fixes the market download text but not for other downloads. Not sure how to fix that. Was that your question?

Code:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@android:id/background">
        <shape>
            <corners android:radius="5.0dip" />
            <gradient android:startColor="#ff444444" android:endColor="#ff444444" android:angle="270.0" android:centerY="0.7" android:centerColor="#ff444444" />
        </shape>
    </item>
    <item android:id="@android:id/secondaryProgress">
        <clip>
            <shape>
                <corners android:radius="5.0dip" />
                <gradient android:startColor="#8016e8ff" android:endColor="#a00f9cac" android:angle="270.0" android:centerY="0.8" android:centerColor="#801ad5eb" />
            </shape>
        </clip>
    </item>
    <item android:id="@android:id/progress">
        <clip>
            <shape>
                <corners android:radius="5.0dip" />
                <gradient android:startColor="#ff8ebf2a" android:endColor="#ff8ebf2a" android:angle="270.0" android:centerY="0.8" android:centerColor="#ff8ebf2a" />
            </shape>
        </clip>
    </item>
</layer-list>
 

Moystard

Senior Member
Jul 23, 2010
57
5
0
I am using the SupeAOSP ROM on my Nexus S and I have a problem with the brand new Music application. Some resources are changed by the ROM and the application looks ugly: big square instead of the pin icon notably.

Do you have a quick method to fix that? I guess I have to change the resources embedded by the ROM...
 

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
I am using the SupeAOSP ROM on my Nexus S and I have a problem with the brand new Music application. Some resources are changed by the ROM and the application looks ugly: big square instead of the pin icon notably.

Do you have a quick method to fix that? I guess I have to change the resources embedded by the ROM...
Look in the res/drawable folders of the app and change the image that you dislike.
 

etoy

Senior Member
Dec 21, 2009
1,814
862
0
i'm quite done with my theme (then i'll show you :))..i just don't know how to put a custom background to the titlebar? i found some nice images for title_bar_medium.9.png,title_bar_tall.9.png and they just work fine..but if i change title_bar_portrait.9.png or title_bar.9.png,nothing changes. i still get the usual grey titlebar. i also tried editing activity_title_bar.9.png but then i have FCs on every app i try to run. do i have to edit some .xml to have a simple image as titlebar or what?


and another question is: what do you advise me to do to start creating a CM7 t-mobile theme? to get a ready theme (like androidian) and edit it or start from scratch?

does a cm7 theme cover all the existing mods (images + statusbar/notification,etc..) or it's also needed to prepare a standalone morph for some missing xmls?
 
Last edited:

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
i'm quite done with my theme (then i'll show you :))..i just don't know how to put a custom background to the titlebar? i found some nice images for title_bar_medium.9.png,title_bar_tall.9.png and they just work fine..but if i change title_bar_portrait.9.png or title_bar.9.png,nothing changes. i still get the usual grey titlebar. i also tried editing activity_title_bar.9.png but then i have FCs on every app i try to run. do i have to edit some .xml to have a simple image as titlebar or what?


and another question is: what do you advise me to do to start creating a CM7 t-mobile theme? to get a ready theme (like androidian) and edit it or start from scratch?

does a cm7 theme cover all the existing mods (images + statusbar/notification,etc..) or it's also needed to prepare a standalone morph for some missing xmls?
In CM7, the notifications title background is called shade_header_background.9 in SystemUI and not titlebar_portrait.9.

Follow this guide for the Theme Chooser themes:

http://forum.xda-developers.com/showthread.php?t=964391
 

etoy

Senior Member
Dec 21, 2009
1,814
862
0
er.. i mean this grey bar on top of the screen..isn't it called "titlebar"? it's the same in all apps and i didnt find how to change it yet.

i checked shade_header_background.9.png but it's the notifications title background bar on notification pulldown,just below the power widget.



i'm just trying to make it look like the second one (which is taken off a cm7 theme) but i can't find/edit that file :confused:

p.s. thanks for the tmobile theming thread tip! i'll study it asap ;)
 
Last edited:

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
er.. i mean this grey bar on top of the screen..isn't it called "titlebar"? it's the same in all apps and i didnt find how to change it yet.

i checked shade_header_background.9.png but it's the notifications title background bar on notification pulldown,just below the power widget.


i'm just trying to make it look like the second one (which is taken off a cm7 theme) but i can't find/edit that file :confused:

p.s. thanks for the tmobile theming thread tip! i'll study it asap ;)
Look for activity_title_bar.9 in the framework.
 

etoy

Senior Member
Dec 21, 2009
1,814
862
0
Look for activity_title_bar.9 in the framework.
yea,i tried to edit that png but then i have FCs on all apps i try to run.

i've read there's some 9patch infos in this png and i have to dig out how to use a themed one preserving those infos inside.

in CM7 themes the activity_title_bar.9 is redirected to frameworks_res_title_bar.9.png.. how to do it on framework-res.apk?


that's from android.xml inside androidian.apk:
Code:
<item name="drawable/title_bar">@drawable/frameworks_res_title_bar</item>
<item name="drawable/activity_title_bar">@drawable/frameworks_res_title_bar</item>
i tried also this but i didn't understand how to make it work. :(
 

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
yea,i tried to edit that png but then i have FCs on all apps i try to run.

i've read there's some 9patch infos in this png and i have to dig out how to use a themed one preserving those infos inside.

in CM7 themes the activity_title_bar.9 is redirected to frameworks_res_title_bar.9.png.. how to do it on framework-res.apk?


that's from android.xml inside androidian.apk:
Code:
<item name="drawable/title_bar">@drawable/frameworks_res_title_bar</item>
<item name="drawable/activity_title_bar">@drawable/frameworks_res_title_bar</item>
i tried also this but i didn't understand how to make it work. :(
If you edit that png and break the .9 image, it will FC some apps because they will fail to load the title. You can get an all black one from my onyx theme. Its already .9 patched. Put that in your framework and you're good to go.

I would suggest focusing your time on the theme chooser themes as they are superior and compatibility is no issue.
 

etoy

Senior Member
Dec 21, 2009
1,814
862
0
If you edit that png and break the .9 image, it will FC some apps because they will fail to load the title. You can get an all black one from my onyx theme. Its already .9 patched. Put that in your framework and you're good to go.
thanks a lot,i realized how to edit it using your black one as template,i added a 1px neon green line and i'm set with that too!

i love how it looks now,apk manager is still my best friend :) thanks for your useful tips.



sonnysekhon said:
I would suggest focusing your time on the theme chooser themes as they are superior and compatibility is no issue.
i'd like to kinda finish my theme idea as a "preview", editing the single apks..then i'll focus on creating a theme chooser theme from scratch, adding every single mod i did but i think it will be a long and hard work. is it possible to include ALL the mods in a single theme chooser theme or i'll have to prepare also some additional morph, due to some limitations? i've seen you made some morph for lucid,vivid,etc... is it because of some limitation of the CM7 theme engine?