[Q] Theming Help - XML, and more [Compendium w/ Answers] - Android Themes

Hey guys so I m pretty much flat out new to theming and Android in general but I've gotten by so far with google and sites such as this, and androidforums. Except I keep running into problems and I figured posting my self would probably be best. My plan is to update this post with new questions I have and also keeping updated with the correct answer if provided for easy reference for future use.
Current Problem: SystemUI.apk - quickpanel_quick_settings.xml XML changes won't apply
What I am trying to do is change the default "Auto Rotation" text in the status bar to one line and realign it with the rest of the GPS/Bluetooth/WiFi text.
I have managed to change the strings.xml to reflect the "Auto Rotation" > "Rotation" change, but if you look in the below picture the text for "Rotation" is still unaligned with the other text.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I know the XML for positioning the text is in quickpanel_quick_settings
I changed the following line:
Code:
android:textColor="@color/quickpanel_text" android:gravity="center_horizontal" android:id="@id/quickpanel_rotation_btn_text" android:paddingTop="44.669983dip"
to
Code:
android:textColor="@color/quickpanel_text" android:gravity="center_horizontal" android:id="@id/quickpanel_rotation_btn_text" android:paddingTop="54.669983dip"
Yet it still does not lower the text by what appears to be the right value (10px, or to 54.669983 - all GPS,Wifi, Bluetooth share the exact same format). Is it something wrong with compiling or am I forgetting to change a value somewhere else?
Fixed Problems
Problem: twframework-res.apk TAB images don't stretch:
Fix: http://forum.xda-developers.com/showpost.php?p=15842355&postcount=3

Cite said:
Hey guys so I m pretty much flat out new to theming and Android in general but I've gotten by so far with google and sites such as this, and androidforums. Except I keep running into problems and I figured posting my self would probably be best. My plan is to update this post with new questions I have and also keeping updated with the correct answer if provided for easy reference for future use.
So without further ado my first problem lies currently in twframework-res.apk.
Currently I am trying to edit the tw_tab_selected.9.png. I have an odd problem in that when I edit it and add in the proper guidelines in draw9- which was none (*Note the original tw_tab_selected.9.png actually does not have any guidelines even though it is a .9png) it seems to stretch out like below:
The image SHOULD stretch out and appear like the following image:
Couple of notes:
- I have tried adding guidelines to my modified tw_tab_selected.9.png, below is an example of one of the guideline formats I tried but still yielded similar results as above picture #1 (This was following the draw9 guidelines of a similar image tw_tab_selected_ss.9.png)
Click to expand...
Click to collapse
You'll only see the guides on a decompiled .9.png. I've always had better luck with xUltimates nine patch tool.

Problem: twframework-res.apk TAB images don't stretch
So without further ado my first problem lies currently in twframework-res.apk.
Currently I am trying to edit the tw_tab_selected.9.png. I have an odd problem in that when I edit it and add in the proper guidelines in draw9- which was none (*Note the original tw_tab_selected.9.png actually does not have any guidelines even though it is a .9png) it seems to stretch out like below:
The image SHOULD stretch out and appear like the following image:
Couple of notes:
- I have tried adding guidelines to my modified tw_tab_selected.9.png, below is an example of one of the guideline formats I tried but still yielded similar results as above picture #1 (This was following the draw9 guidelines of a similar image tw_tab_selected_ss.9.png)
How to fix
Okay so it was a problem with properly compiling the image after adding in the guidelines > using xUltimate did indeed fix it. What was done is that I still ended up using draw9patch to edit the guidelines into my modified tw_tab_selected.9.png > put the new png into the example 1 folder of xUltimate9compiler tool > compiled > copied compiled tw_tab_selected.9.png into twframework-res.apk and pushed it.
http://forum.xda-developers.com/showpost.php?p=15842291&postcount=2 Thanks 3rd!

Sorry for the bump - will also edit this post for answer to current questions answer

Related

Can't find these elements - are they obsolete?

Hi,
I'm quite new to Android so I don't know where to find all elements in the phone. Please have a look at this image and let me know if you know if the images are used or obsolete!
One additional element not in the photo is the scrollbar handle, that large thing that used to pop out from the scrollbar at times - is it gone?
I assume there is already info on how to theme the progressbar, I will search for this info later.
Thanks in advance.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
all of those are in framework-res.apk/res/drawable
the scrollbar is also in that same folder.
to edit the color of the progress bar you have to edit progress_horizontal.xml, here is a little guide i made in a thread about how to easily do hex edits for color in .xml's. the only one of those files that still applies is .xml above. 1.6 did away with 1.5's way of doing the progress circles.
Pretty sure he's asking where the elements are actually used on the phone. As in, what apps use them, etc.
All are used besides the battery charged, and the files are like david said in the "framework-res.apk/res/drawable"
There are some outdated images left over from older OS versions, I usually just tend to ignore these so I have less to edit. The scroll bar large mode icon appears in contact.apk if you still want to edit that, im not sure which other system app uses it. I think what happened was google did a little cleaning up and moved app specific resources inside the app's apk files instead of having them float around in frameworks. They do need a serious clean up of the folder though.
Thank you for the replies!
Yes, I am in fact asking where they are used on the phone. I have a HTC Dream that I'm testing with, and I have not found apps that use the elements that I've listed.
So the battery charge is not used - thanks!
What about the rest, do you know an app that uses them?
The reason I want to find them is so that I can change them and see how it turns out on the device. I'm doing this for a client and I've tracked down all of them except these last ones.
I'm not positive but I can say a lot of them ARE obselete:
Erase Button: I believe it used to come in handy during 1.0/1.1 OS, haven't seen a use for it on 1.5+ devices
Picker Box: Definitely obselete, have not seen these used in quiet a while..
Spinner: These might be date/time picker images, go into alarm clock app, set alarm or change time for any of them I believe they show up here, not sure about the arrows though.
Battery Charge: have NOT been used since android 1.0 initial release, rc29, which was taken out a long long time ago.
Progress bar graphics: These are xml changes, I believe. As someone pointed out earlier you can try changing them via xml changes.
Your best bet is just not edit them, they're in the system/frameworks folder for no reason at all, I say save yourself the work and avoid them.
Hope that's clearer.
prash said:
I'm not positive but I can say a lot of them ARE obselete:
Erase Button: I believe it used to come in handy during 1.0/1.1 OS, haven't seen a use for it on 1.5+ devices
Picker Box: Definitely obselete, have not seen these used in quiet a while..
Spinner: These might be date/time picker images, go into alarm clock app, set alarm or change time for any of them I believe they show up here, not sure about the arrows though.
Battery Charge: have NOT been used since android 1.0 initial release, rc29, which was taken out a long long time ago.
Progress bar graphics: These are xml changes, I believe. As someone pointed out earlier you can try changing them via xml changes.
Your best bet is just not edit them, they're in the system/frameworks folder for no reason at all, I say save yourself the work and avoid them.
Hope that's clearer.
Click to expand...
Click to collapse
Thanks a bunch! This just saved me a headache

How do I make this black text become white?

I've been trying to change some of the text colors in a dark theme I'm working on, but I can't seem to get certain text to become white. The text I'm talking about is the black stuff in the screenshot below. I've used the color changer tool, but it doesn't seem to be able to change these colors. Either that or I'm just not finding the correct option. Can anyone help and point me in the right direction?
Screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The color changer tool I'm using:
http://forum.xda-developers.com/showthread.php?t=535630&highlight=white+text
mytharak said:
I've been trying to change some of the text colors in a dark theme I'm working on, but I can't seem to get certain text to become white. The text I'm talking about is the black stuff in the screenshot below. I've used the color changer tool, but it doesn't seem to be able to change these colors. Either that or I'm just not finding the correct option. Can anyone help and point me in the right direction?
Screenshot:
The color changer tool I'm using:
http://forum.xda-developers.com/showthread.php?t=535630&highlight=white+text
Click to expand...
Click to collapse
xml edits. Been 100 threads started for this same question. Please feel free to search for one of them.
Ignore the previous post, I am not sure why noobs feel a need to come on here and be a d*** when they have no clue what they are talking about. Search as you like, unless you are going to compile your own ROM from source, this cannot be accomplished through an xml edit. Though these font colors are initially in xml files, after the ROM is compiled they are in .dex files. Search for baksmali.jar, which will decode your .dex files so that you can find the proper file (there is also smali.jar to compile), then search on how to edit the .dex files. This is not easy, but can be done. To be honest, for my theme I found it to be much easier to just change to color around the font.
cloverdale said:
Ignore the previous post, I am not sure why noobs feel a need to come on here and be a d*** when they have no clue what they are talking about. Search as you like, unless you are going to compile your own ROM from source, this cannot be accomplished through an xml edit. Though these font colors are initially in xml files, after the ROM is compiled they are in .dex files. Search for baksmali.jar, which will decode your .dex files so that you can find the proper file (there is also smali.jar to compile), then search on how to edit the .dex files. This is not easy, but can be done. To be honest, for my theme I found it to be much easier to just change to color around the font.
Click to expand...
Click to collapse
or you can take 2 seconds to edit the xml file (2-3 instances of the same string) and put it in your theme tada done. Ive done it a hundred times
mytharak said:
I've been trying to change some of the text colors in a dark theme I'm working on, but I can't seem to get certain text to become white. The text I'm talking about is the black stuff in the screenshot below. I've used the color changer tool, but it doesn't seem to be able to change these colors. Either that or I'm just not finding the correct option. Can anyone help and point me in the right direction?
Screenshot:
The color changer tool I'm using:
http://forum.xda-developers.com/showthread.php?t=535630&highlight=white+text
Click to expand...
Click to collapse
Hey, if ur using cyan's rom then just run colorchange.jar....itll do this and much more
since no one will actually give you a straight answer. to change the text from black to white for those items, then you will need to edit
framework-res.apk/res/layout/status_bar_expanded.xml
framework-res.apk/res/layout/status_bar_latest_event_content.xml
also for market downloads
DownloadProvider.apk/res/layout/status_bar_ongoing_event_progress_bar.xml
change the 6 digits after 08 00 00 1C to FF FF FF to achieve the white text.
Thank you, David, for that not so useless reply.
Should be obvious to anyone who read my first post that I've already done searching and worked with the color changer BEFORE posting.
mytharak said:
Thank you, David, for that not so useless reply.
Should be obvious to anyone who read my first post that I've already done searching and worked with the color changer BEFORE posting.
Click to expand...
Click to collapse
Cm settings. Under user options u can change it also if ur using cm

[HELP NEEDED] Make An Icon and Other Graphics for NubDial :P

Hi all,
Sorry if this is the wrong place to start the thread, but I figured most of the design-gifted people will be here.
Some of you might know I'm currently working on NubDial, a smart dialer for Android (more specifically it only works on 2.0+ for now), and am in need of some graphics. NubDial is open-source and free and will always remain that way .
The highest priority right now would be the icon, and eventually I hope the other graphics are replaced as well. I'm looking at something that looks like stock, just nicer. In fact, just throw your concepts/ideas out here!
Also, I'm really bad at 9patch files, so I'd appreciate it greatly if you could do that as well.
I've attached the drawables up, the one with ALL the required files are in hdpi folders, so if you do make them please make them for the mdpi ones too.
Thanks for the help!
NubDial XDA page: http://forum.xda-developers.com/showthread.php?t=629032
Source: http://code.google.com/p/nubdial
Anything you want out of it besides just looking like stock but nicer?
hey bro,
let me give you a tip. drag, drop, rename the image name to the appropriate image name from anything you like from either the dialer i put together or any dialer of your choice. it's as easy as one two three.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
this looks stock enough. probaby just need to change the colors for you. if you go to the CYANOCH xrom theme. you can find all the files inside the phone.apk.
inside the drawables folder you gave, you only have to worry about the 12 main files which can be modified inside the mdpi folder and then dropped inside the hdpi folder- since the hdpi folder is irrelevant for g1's and mt3g's. you can pair all those files from my dialer. so the dialer digits area would coincide with the the main digits area you see above, the delete button on bottom right would coincide with the top right delete button in your nubdialer, and the middle bottom call button would coincide with the top left call button in your nubdialer. um, and as usual, the dial_btn_normal, pressed, selected would be the same for the dialer buttons.
hi, I make some changes to the code, but dont know how to update the source,
my email : qingcai at gmail dot com.
Hello, I'm new at this forum and my level of english is not so good. I have a doubt with android and in a spanish forum I was told that here could help me. My problem is the next: I want to compile android browser but I can't. Searching in google in found this in another forum:
"But now I want to compile android's Browser. Is the application's (e.g. Browser's) source code + 'developer SDK' enough to accomplish this?
No. The built-in applications can only be built as part of the firmware, as most were written before the SDK existed."
I write in this post because in the spanish forum told me that Wysie made modifications to the borwser and maybe is capable to help me. Sorry for the inconvenience and thank you.
bencrimo said:
Hello, I'm new at this forum and my level of english is not so good. I have a doubt with android and in a spanish forum I was told that here could help me. My problem is the next: I want to compile android browser but I can't. Searching in google in found this in another forum:
"But now I want to compile android's Browser. Is the application's (e.g. Browser's) source code + 'developer SDK' enough to accomplish this?
No. The built-in applications can only be built as part of the firmware, as most were written before the SDK existed."
I write in this post because in the spanish forum told me that Wysie made modifications to the borwser and maybe is capable to help me. Sorry for the inconvenience and thank you.
Click to expand...
Click to collapse
you must compile the entire android source to modify system apps. this cannot be done on widows, only on linux or mac OSX. you must download the source (google "android get source") then make your changes and recompile. once again this cannot be done on windows. if you are running windows but are still interested, you can google "ubuntu live CD" and download the ubuntu system image and burn it to a cd. this will give you several options.
1) you can install ubuntu INSIDE windows as a windows application.
2) you can install ubuntu ALONGSIDE windows, allowing you to boot into either OS system independently.*
3) you can remove windows completely, format your HDD, and install ubuntu.*
4) you can boot ubuntu FROM THE LIVECD, to try out and see if you like it, without making ANY changes to your computer or filesystem. this option is not for continued use, as no changes you make while booted into the LIVECD will be saved. it is considered DEMO MODE.
* NOTE: OPTIONS 2 AND 3 REQUIRE YOU TO FORMAT OR REPARTITION YOUR HARDDRIVE. THIS HAS THE ABILITY TO CAUSE DATA LOSS, SYSTEM FAILURE, ETC, AND SHOULD NOT BE ATTEMTED IF YOU DONT KNOW WHAT YOU ARE DOING, AND/OR IF YOU HAVE NOT MADE PROPER BACKUPS OF YOUR IMPORTANT DATA. I AM NOT RESPONSIBLE FOR ANY DAMAGE RESULTING FROM ANY UNINFORMED DECISIONS YOU MAY MAKE.
option 1 is the safest way to start out if youre interested. this way it install as a windows application, and there is NO RISK of data loss.
good luck...
-BMFC

PopUp menus & other areas that need tweaked...

I have been searching for HOURS the last couple days to find the answer to this and have yet to solve these issues. I appologize if this is the inappropriate place for this, but it seemed right......
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is part of the settings menu(obviously) but I can't find out how to edit the text here that is black!! I want to invert the settings menu but I have only made framework edits(I HAVE LOOKED and have found no good tutorial on this...) If anything, how do I make the text black? Id rather it be white text on black bg.
Edit: Thanks xKape!!!!
Finally got the settings inverted. Decompile. Edit manifest to theme.dark and edit the res/layout/manageapplications and manageapplicationsitems xmls and add android:textColor="#ffffffff" after each of the text appearance areas and add android:background="#ff000000" to the orientation & frame lines.
In this menu, I need to make the text white here and can't find the solution.
In the buttons on the bottom, I want to make that text white, but can't figure it out.
EDIT: Styles.xml search for Widget.Button and edit the text there and search <style name="TextAppearance.Widget.Button" parent="@style/TextAppearance.Small.Inverse">
<item name="textColor">@color/primary_text_dark</item>
Make <item name="textColor">@color/primary_text_dark</item>
As you can see in the market history(as well as the suggestions) I get white text on white. Idc how to fix this, but id like to see white text on black bg but it doesn't really matter.
This is the "more" menu for apps. I need white text here.
EDIT:Fixed (ill look for the change I made and tell)
again, the settings menu, I'd like to see this inverted, but at least black text would suffice. I want the menus to black bg with white text.
Edit:
Read the first picture for the edits. Thanks xKape!!!
I have scoured 8 different forums and tutorials with no luck and none of the tutorials covered the areas I need help with. Would someone please point me to a sufficient tutorial or help me make these edits. I have been trying for the last 10 hours trying to get this fix'd, next to the week or so of researching and testing throughout with no luck.
Thanks
Bump for support
Tapin' the Talk on the xSquared
Hey is that your GBP7?? Lol
I wish I could help you man, just saw your thread and wanted to see what you needed
Sent from my Incredible 2 using XDA App
yep...reworked all the.9s and pngs and it looks really nice...it's released currently as a patch to fix the other theme errors from b4...but this is all that's left. Anyone?
Tapin' the Talk on the xSquared
Bump for support
Tapin' the Talk on the xSquared
BUMP! For urgent support please.
Someone has to know how to do this.
Tapin' the Talk on the xSquared
for settings.apk edit the manifest t be theme.black. that will take care of all of it except the manage applications section. for that, there are two xmls in the layout folder that you need to add the background and text color code. android:background="#ff000000" and android:textColor="#ffffffff"
For the others, i dont have much experience but, i will tell you this.. if you are trying to black out your rom, i would really look at the framework and go into colors.xml and find the black calls and make them white. what i would probably do as a test is, lets say i was chaning 5 colors in there.. i would make a note and change one to pink, purple, yellow, red and green. then i would install it and figure out what went to what color and then go back and change accordingly with that knowledge.
I see the potential in this babe.
Sent from my Galaxy Ace running J.A.F CM 7.2 Odexed using XDA App
Thank you xkape! That was the major issue. The framework edits are going to be rough going through because I have looked at everything and can't find the right edits. I thought bout doing the random color edits and note what was what. I'll prob do that after a couple more edits and release of the update.
Tapin' the Talk on the xSquared

[APP]Black and white themed mms.apk [Updated 12/8/11]

Ok this is basically finished. Just needs a few more tweaks.
Make sure you back up your default mms.apk before you use this one.
Themed version:
http://db.tt/OMBgFaLa
Stock version:
http://db.tt/woexlR8C
Zip to install Themed mms.apk:
http://db.tt/e7rp4jew
Zip to install Stock mms.apk:
http://db.tt/vJCPKCkb
Installation:
Download
Use a root explorer to place into /system/app
or
Flash the zip file
Reboot
Profit
PS: On certain themes this may not look great... Meezy installed and sent me these screenshots:
http://dl.dropbox.com/u/7129559/screenies/snap20111208_200120.png
http://dl.dropbox.com/u/7129559/screenies/snap20111208_200152.png
If you like this please hit the thanks button
screen shot?
Haxcid said:
screen shot?
Click to expand...
Click to collapse
I don't have that option I'm sorry Maybe someone who wants to install it can take some screen shots and post them for me.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
idk if the apk on that link works anymore.....I've been working on this a lot today and I got it to the point where it just FCs when you try to open a thread. It's one of the xml files I can either color the text inside the bubbles or put a background on the main page of the app.
pendo said:
Cool...you made it sound a lot easier than when I did this a couple months ago. (I didn't use ImageMagick).
One word of caution, if you are just adjusting hue you'll be ok, but if you inrease brightness or maybe decrease opaticy...you will throw an aapt compiling error. The ticks that mark the stretchable areas have to be either black, or nothing. No imtermediates. What I do is when I'm working with an image like that, I'll just select everything except the 1 pixel border, then I can edit however inside without messing up the 9patch ticks.
Click to expand...
Click to collapse
I just found this. Maybe it will help, maybe not. I tried to do stuff with those damn .9.png files, but I've had no luck.
From this threadhttp://forum.xda-developers.com/showthread.php?t=883392
nmsamsel said:
I just found this. Maybe it will help, maybe not. I tried to do stuff with those damn .9.png files, but I've had no luck.
From this threadhttp://forum.xda-developers.com/showthread.php?t=883392
Click to expand...
Click to collapse
Where did that quote come from? lol
Also, I know what is causing the Force closes I just don't understand why it is causing them. I can either make the back ground in the main part of the app black or change the text color inside the threads. I'm going to work with it tonight and prolly just leave the text color black inside the thread and come up with a different color for the bubbles
Okay. The apk on that link is working. There are 2 things I want to change but when I change them it FC's. btw one of them mt can change just fine.... I will get some screenshots and post them here for your viewing pleasure

Categories

Resources