# [HELP] CM7 Layout XML's



## Stetsonaw (Jun 8, 2011)

Working on my theme for the CM7 Theme Chooser, but am wondering how i throw layout edits from the framework into it. Would it be like below?

would just adding this to android.xml work, 
<item name="layout/status_bar_latest_event_content">@layout/framework_status_bar_latest_event_content</item> 
then copying the modified xml into the theme/res/layout folder and naming it to match?


----------



## JsinLegacy (Jun 7, 2011)

Yes you are correct.. but you will also have to have in corresponding xmls or images that the modified XML calls for


----------



## Stetsonaw (Jun 8, 2011)

Thanks man! Hitting you up on GTalk now.


----------



## nmiltner (Jun 6, 2011)

I've been trying to push a few of these too. Keep getting errors when compiling that there is an error @id/something or string/something
I think that you also have to put the id.xml and the string.xml in the correct folders when compiling. I was going to try and figure this out tonight.


----------



## Stetsonaw (Jun 8, 2011)

Good point about the styles.xml. or just add the entries you need to the existing one, like you would do for the colors.xml. don't know if you would need the ids.xml though. Need someone to weigh in on that.

Sent from 1885


----------



## nmiltner (Jun 6, 2011)

When I build, if the layout.xml has a call to @id I get a compile error b/c the id doesn't exist. I might be doing something wrong though.


----------



## Stetsonaw (Jun 8, 2011)

I guess make in id.xml to dump it all in, and just have any xml call out to the line in there?

Sent from 1885


----------



## Stetsonaw (Jun 8, 2011)

Well this will save me quite a few hours... 1-4a Rename. Very basic, albeit, Very AWESOME renaming tool.


----------



## JsinLegacy (Jun 7, 2011)

nmiltner said:


> When I build, if the layout.xml has a call to @id I get a compile error b/c the id doesn't exist. I might be doing something wrong though.


just add an id.xml to the values folder.. you can just copy and paste the one from the apk you are trying to get the theme engine to create... or you can just create one and only add the id's you need that the xml... usually this is the easiest way IMO as then you don't have a bunch of unwanted id's in there that might cause confusion..


----------



## Stetsonaw (Jun 8, 2011)

Exactly what I was planning on doing, just doing all the pngs right now.

Sent from 1885


----------



## JsinLegacy (Jun 7, 2011)

Stetsonaw said:


> Exactly what I was planning on doing, just doing all the pngs right now.
> 
> Sent from 1885


yeah i remember discussing this last night with you on gtalk  ... you can do the same if you need an xml that is in a folder that is not in the theme engine template...


----------



## Stetsonaw (Jun 8, 2011)

Yeah, like the drawable xmls i'll be adding for the animated status bar icons.


----------



## bgill55 (Jun 11, 2011)

Pretty sure you cant make layout edits with the theme engine. It's based off activities. Which layouts.aren't. Hence whywr can't theme the lockscreen or volume rocker bar. Cause they aren't activities. They need to be able to be redirected. And you cant redirect something that has no original direction. If that makes sense.

Sent from my ThunderBolt using Tapatalk


----------



## JsinLegacy (Jun 7, 2011)

bgill55 said:


> Pretty sure you cant make layout edits with the theme engine. It's based off activities. Which layouts.aren't. Hence whywr can't theme the lockscreen or volume rocker bar. Cause they aren't activities. They need to be able to be redirected. And you cant redirect something that has no original direction. If that makes sense.
> 
> Sent from my ThunderBolt using Tapatalk


I have found a couple that work.. mostly for contacts... nothing major tho


----------



## bgill55 (Jun 11, 2011)

JsinLegacy said:


> I will go out and say yes.. yes you can... BUT... it is extremely limited and I have only found a couple edits that will actually work


For example?

Sent from my ThunderBolt using Tapatalk


----------



## JsinLegacy (Jun 7, 2011)

bgill55 said:


> For example?
> 
> Sent from my ThunderBolt using Tapatalk


for layout-finger in contacts I have been able to get contacts list item and list section to work ..

I will say that the edits work... the only issue was when selecting a contact in the contact list the app would FC on me.. everything else worked fine and the edit took (sort of)

I will also say I tried many many others that led to fail .. causing the theme to fc every time chosen or causing the apk to not even compile


----------



## Stetsonaw (Jun 8, 2011)

But you should be good if you have the id/ done correctly, right? Gonna try it, only have dos layout xmls... the appwidgetpicker for text color, and the drawable/progress_horizontal for the progress bar changes.

If not, there's always metamorphs/side-loading!


----------



## Skurtz1313 (Jun 6, 2011)

Stetsonaw said:


> But you should be good if you have the id/ done correctly, right? Gonna try it, only have dos layout xmls... the appwidgetpicker for text color, and the drawable/progress_horizontal for the progress bar changes.
> 
> If not, there's always metamorphs/side-loading!


IDs get rebuilt when compiling. If u r gonna screw with those u have to make sure they match how it calls out in smali.


----------



## nmiltner (Jun 6, 2011)

JsinLegacy said:


> just add an id.xml to the values folder.. you can just copy and paste the one from the apk you are trying to get the theme engine to create... or you can just create one and only add the id's you need that the xml... usually this is the easiest way IMO as then you don't have a bunch of unwanted id's in there that might cause confusion..


That is exactly what I ended up doing, except after it compiled, the widget wouldn't load. Guess ill just have to deal with it as it is.


----------



## Stetsonaw (Jun 8, 2011)

nmiltner said:


> That is exactly what I ended up doing, except after it compiled, the widget wouldn't load. Guess ill just have to deal with it as it is.


You talking about the appwidgetpicker? Not a big deal, as the app isn't part of CM7 anyway. I'll just remove that stuff and have it part of an addon zip.


----------

