Ok - so lots of searches have brought together a good amount of information regarding this, but I'm still having a bit of trouble - and would love some help from the people who seem to know how to customize this. This could also be a good reference for the future.
I would really like to be able to edit the colors of the various progress bars/circles around the Android. But I cannot seem to figure this out.
So, the files are in the framework-res.apk/res/drawable/ folder, and are apparently the following files:
progress_horizontal.xml
progress_large.xml
progress_medium.xml
progress_small.xml
progress_small_titlebar.xml
So, here is a sample of what is in progress_horizontal.xml:
Code:
<!--
Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
−
<layer-list>
−
<item android:id="@android:id/background">
−
<shape>
<corners android:radius="5dip"/>
<gradient android:startColor="#ff9d9e9d" android:centerColor="#ff5a5d5a" android:centerY="0.75" android:endColor="#ff747674" android:angle="270"/>
</shape>
</item>
−
<item android:id="@android:id/secondaryProgress">
−
<clip>
−
<shape>
<corners android:radius="5dip"/>
<gradient android:startColor="#80ffd300" android:centerColor="#80ffb600" android:centerY="0.75" android:endColor="#a0ffcb00" android:angle="270"/>
</shape>
</clip>
</item>
−
<item android:id="@android:id/progress">
−
<clip>
−
<shape>
<corners android:radius="5dip"/>
<gradient android:startColor="#ffffd300" android:centerColor="#ffffb600" android:centerY="0.75" android:endColor="#ffffcb00" android:angle="270"/>
</shape>
</clip>
</item>
</layer-list>
I've dabbled in web-design, so colors like "#80ffd300" look familiar...except that they seem to have too many characters. I'm used to hex colors only having 6 characters.
So - question is...how would I go about customizing the colors? I want to change them all to a light-bluish color. I just don't know where to start.
i believe those are eight-digit hexadecimal color codes use google to search for them codes
Check out my modified kspec theme I have them set to a bluish color. When I edit the .xml files I use HxD. Look for the instances of 08 00 00 1C I think (or 80 00 00 1C) I think the first is correct but can't recall right now and am at work using my g1 to post. The next 8 digits after that string control color. Its also backwards so instead of AARRGGBB is typed in as BBGGRRAA the last 2 hex values controlling transparency. Also I think you are correct in all the files you can edit that are posted. In progress_horizontal there are 9 instances of 08 00 00 1C the first 3 controlling the graybackground and the next 6 controlling loading/progress color in the browser and volume and in the music app plus whatever has a horizontal bar lol. In the large medium small and small titlebar there are 3 instances of 08 00 00 1C with the middle one controlling loading color and the first and last being the gray scale. I found all this out by expirimenting with the .xml files, so I figured I would share my finding for all to use. Also if you use the Windows standard built in calculator you can enter in part of the RGB code under Dec and click hex and it will show the hexidecimal binary code that corresponds to it. That's an easy way to figure out any color you would want to use in the .xml I hope my long winded rant helps. I put so much explanation into this so someone that has no clue what to do can still modify the files they want to, not trying to imply the OP doesn't know what to do. Cheers happy editing
namsir said:
i believe those are eight-digit hexadecimal color codes use google to search for them codes
Click to expand...
Click to collapse
Ahhh...indeed. As posted right above me, the first 2 digits control opacity. From xbox-scene forums:
Ok... I have recently been messing with skinning my UnleashX dash. I could not find ONE single tutorial on how to skin so I figured it all out on my own. I learned quite a bit about just looking at the XML files of other skins... but I just couldn't figure out why the hex codes were 8-digit instead of 6. After much experimenting and comparing skins and thinking about it... I realized that the first two digits are OPACITY (transparency). The lower those first two hex digits amount to, the more transparent it is. FF is 100% opacity... and obviously 00 is 0%. The six after that are the hex color codes we all know and love. I thought I'd just contribute to anyone who is struggling to figure out what to do.
Click to expand...
Click to collapse
I am definitely following this. Sorry I can't be of more help
cal3thousand said:
I am definitely following this. Sorry I can't be of more help
Click to expand...
Click to collapse
its really not that hard to edit an .xml for color once you figure out what you are looking for and what you want to change. a week ago i knew absolutely positively nothing about how to edit an .xml, now classes.dex files........ i can use oshaka's colorChange.jar thats it. i can take apart the files but have no clue what i am looking at once i do
This would be a good add on to the colorChange.jar application... I posted the source to it already. You can see how it programatically hex-edits an XML file...
david1171 said:
its really not that hard to edit an .xml for color once you figure out what you are looking for and what you want to change. a week ago i knew absolutely positively nothing about how to edit an .xml, now classes.dex files........ i can use oshaka's colorChange.jar thats it. i can take apart the files but have no clue what i am looking at once i do
Click to expand...
Click to collapse
Pretty much a ditto there on all accounts. I would love to change the circles to either a turquoise or just white so it looks like an Oreo. lol
The files above can be edited just like any other xml.
There is only one reference on the small/medium/large to color that is yellow'ish, and a couple in the horizontal.xml.
These are very few of "all" of the xmls that will need to be edited in order to cover all of the progress bars though.
It looks like some of the actual applications will need to be touched as well (most spefically the browser/market/framework)...
...I think a longer list would be in the works if people wanted to really completely do this.
mianosm said:
The files above can be edited just like any other xml.
There is only one reference on the small/medium/large to color that is yellow'ish, and a couple in the horizontal.xml.
These are very few of "all" of the xmls that will need to be edited in order to cover all of the progress bars though.
It looks like some of the actual applications will need to be touched as well (most spefically the browser/market/framework)...
...I think a longer list would be in the works if people wanted to really completely do this.
Click to expand...
Click to collapse
I have only edited the files above for loading bars ,circles, etc., and from I have not encountered an instance where the bar was a different color. The market, browser, music, volume adjustments, in twidroid.... have all had the changed color. Has anyone found an app where it isn't the changed color?
david1171 said:
I have only edited the files above for loading bars ,circles, etc., and from I have not encountered an instance where the bar was a different color. The market, browser, music, volume adjustments, in twidroid.... have all had the changed color. Has anyone found an app where it isn't the changed color?
Click to expand...
Click to collapse
You were right:
In progress_horizontal there are 9 instances of 08 00 00 1C the first 3 controlling the graybackground and the next 6 controlling loading/progress color in the browser and volume and in the music app plus whatever has a horizontal bar lol.
Click to expand...
Click to collapse
A paragraph would have made that brick a little more readable maybe. I missed the other references in _horizontal. : (
mianosm said:
You were right:
A paragraph would have made that brick a little more readable maybe. I missed the other references in _horizontal. : (
Click to expand...
Click to collapse
Sorry I was typing that from my G1 at work, and once I got started I didn't think about the way it looked.
So, perhaps it is an Ubuntu thing - but I can't seem to open any of the XML files without getting this jarbled block (which I take to mean that it doesn't recognize the encoding):
{
"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"
}
What am I supposed to do about this? I just want to edit the file, and I seem to remember being able to in certain themes. I've tried using XML editors and they say they don't recognize the encoding. The screenshot is from one of the stock CM 3.9.1 Theme Template XMLs.
How do I fix this?
I always use HxD to edit .xml files and it has never given any problems. Sorry I use Windows or I would be of more help, but if no one else can help you try HxD
erissiva said:
So, perhaps it is an Ubuntu thing - but I can't seem to open any of the XML files without getting this jarbled block (which I take to mean that it doesn't recognize the encoding):
What am I supposed to do about this? I just want to edit the file, and I seem to remember being able to in certain themes. I've tried using XML editors and they say they don't recognize the encoding. The screenshot is from one of the stock CM 3.9.1 Theme Template XMLs.
How do I fix this?
Click to expand...
Click to collapse
Ghex for Gnome.
Khex for KDE.
If you are using a better window manager like xfce or xlde, dunno, check the repository for your distribution. ; )
mianosm said:
Ghex for Gnome.
Khex for KDE.
If you are using a better window manager like xfce or xlde, dunno, check the repository for your distribution. ; )
Click to expand...
Click to collapse
I've used GHex extensively. It just seems to give me a fragmented file. Perhaps I have the wrong settings?
Installed HxD to see if that fixes it. Is this what it's supposed to look like?
Yes. that is Hex.
0-9, and A-F.
Ok this needs to be elaborated on. Im not a hex genius or even a hex n00b. I have no idea what any of that means. I know the basic 0-9 A-F. But im not sure where to start changing numbers. Is each 4 digit string one part of the 8 digit code? If its hex with 6 and 2 for opac why am i looking at 32 digits when its 8, crap numbers suck ass.
Honestly77 said:
Ok this needs to be elaborated on. Im not a hex genius or even a hex n00b. I have no idea what any of that means. I know the basic 0-9 A-F. But im not sure where to start changing numbers. Is each 4 digit string one part of the 8 digit code? If its hex with 6 and 2 for opac why am i looking at 32 digits when its 8, crap numbers suck ass.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=479019
I've been reading up on this, but wasn't sure exactly what to modify for Cyanogen's 4.1.11.1. I would like the progress bar to be blue to match my theme, but haven't been successful. Any help would be great, I have read this thread, and am familiar with HxD and RGB color codes. But I don't know what the corresponding codes are that I need to replace, I tried searching through for ones that would match the original orange (I even hex compared some 4.0.4 files that had been modified against the original, but there were so many changes, I didn't know which was which).... any help?
Thanks.
Related
When I'm browsing threads and forums in XDA-developers on my WM6 machine, there are huge margins either side of the content column. (See screenshot below.) They don't need to be there, and I'm wondering whether some kind admin could amend the CSS to reduce the size of these margins please. It would be really simple, I think.
The beginning of the <body> within the page template looks like this:
Code:
<body>
<!-- content table -->
<!-- open content container -->
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 25px 0px 25px">
Could someone try changing the CSS in that final <div> tag to something like:
Code:
<div style="padding:0px 5px 0px 5px">
It's such a small change but it could make such a difference to the usability of XDADev on our PDAs.
In fact, there's another <div> wrapper around the posts in a forum thread as well, so that could be amended too if someone's feeling kind.
Code:
<div id="posts">
<!-- open content container -->
<div align="center">
<div class="page" style="width:100%; text-align:left">
<div style="padding:0px 25px 0px 25px">
*bump*
.
Hi Guys,
Just letting you know i've seen this and i will take some time to look at it, but dinner first if you don't mind too much
Greetz,
Flar
oke I've been searching through templates for a while now but can't seem to find the right template to match. There's also the point that this will influence the way pc users view the forum so when I find the template I will need to check if it's still ok for pc users too.
That being said, if you use i.e. on you phone you can easily change a setting which will solve your problem. In i.e. go to menu -> view -> one column
It's easily changed back if you don't like this setting when using different sites.
Greetz,
Flar
Flar said:
Hi Guys,
Just letting you know i've seen this and i will take some time to look at it, but dinner first if you don't mind too much
Greetz,
Flar
Click to expand...
Click to collapse
Cool
Thanks, Flar.
I take your point about the one-column view, but if you're able to change the template to reduce the CSS padding then that would be even better IMHO.
Will wait for your news.
what about header / footer or GENERIC_SHELL?
try to go to your vbulletin settings -> general ... there you can enable a comment in html from which template the html code is derived.
also there's an error in your postbit (i think). the menu above the posts is wider, than the posts themselves. that is not correct.
Hi Guys,
When it comes to modifying templates we have quite a lot on our plate right now due to extensive changes in the upcoming software upgrade.
I'll monitor this thread but it might take quite some time before I can actively try to solve this issue for you, my apologies..
Greetz,
Flar
Not to beat a dead horse, but some kind of allowance for using a PDA to view a PDA oriented site would be great. XDA is just useless when viewing on my hermes. Thanks for the hard work though, this post is in no way intended to be a knock, just something i think A LOT of people would appreciate.
Nevermind, I found the help I needed here. I may need help later on, but for now I can continue myself.
--------------
Hey there, thanks for reading.
I'm working on my first Windows Phone application, but I'm having some trouble right now. It's an application to keep track of donations to a small children's daycare. The idea is to keep track of what has anything that has recently been donated, and what people said that they might have (for example over the phone) so they can keep track of what to expect, what to look for and what to replace in the near future.
As I'm pretty new to Silverlight and C# (I do have plenty xHTML / CSS / PHP experience) I find it hard to parse and write to the XML file correctly. I've searched on MSDN and browsed trough a few pages of Google search results, but to no avail. I did find some examples, for example using XDocument, but then MSDN said it wasn't available for SL on Windows Phone.
Basically, I need a method that, depending on the input ...
# reads all items from the XML (to show a list on the app's main page)
# reads 1 specific item (for a detail view)
or
# reads either all received, or all expected donations
Also, I'm not quite sure what would be the best way to save the DateTime value to the XML. I assumed the best way would be splitting it up in day/month/year etc, but if there's a better solution I'll gladly take your advice.
If any of you could show me an example, or give me a push in the right direction, I would really appreciate it!
My current XML layout is below:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<donations>
<received>
<!-- begin sample data-->
<donation id="0">
<dateTime>
<day>18</day>
<month>2</month>
<year>2011</year>
<hours>5</hours>
<minutes>13</minutes>
</dateTime>
<contact>Henk</contact>
<items>Football, 2 tennis rackets</items>
<money>150.00</money>
<description>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac justo dui, id aliquam erat. Aliquam quis lorem et nulla.</description>
</donation>
<!-- end sample data-->
</received>
<expected>
</expected>
</donations>
problem how to display a lot of data to a itemsControl - ListBox?
Hello everyone! I am student developers as on windows phone and I recontre a problem when I want to display in my listbox ItemsControl.
Let me explain the problem:
I said three itemsControl in my listbox;
<ListBox name="MyListBox" >
<ItemsControl name="item_BeforeHead" />
<ItemsControl name="item_Head" />
<ItemsControl name="item_Body" />
</ListBox >
After I get a "Http request" full source code of a web page and I cutting (parse) the contents into three parts: <Before head> <head> <body> to place them in the good items!
The problem is the big website containing more than 50,000 - 1000'000 characters. So more than 30,000 characters in each itemControls. And the problem is the display that's slowing my listbox! The movement is made by jerks ..
Y is there a better way to charge a lot of content and display it after?
Thank you very much in advance for your help, this was a moment I'm looking for this solution ...
And again sorry for my bad english;-)
Change your app design. The whole idea to display items 30,000 characters long is completely wrong (doesn't really matter how fast you are displaying that junk), your list/whatever become simple unreadable.
So, try to formulate your task requirements in correct way first, and look for correct solution after (4 example, if you are trying to display ebooks, there are a few possible solution etc.)
mhhh thank you ! But i found this :
http://stackoverflow.com/questions/6170640/lazy-loading-of-listbox-images-from-isolated-storage
And also this class : "LongListSelector" for windows phone 7
kingmiddle said:
mhhh thank you ! But i found this :
http://stackoverflow.com/questions/6170640/lazy-loading-of-listbox-images-from-isolated-storage
And also this class : "LongListSelector" for windows phone 7
Click to expand...
Click to collapse
I highly doubt this will be beneficial to you as I believe this is also build on the standard listbox. If you really need to store that many items, think about implementing a database, and than let the listbox directly read the data out from the database and filter the amount of results down if needed.
But like sensboston said, don't know what u are trying to do, but who is gonna read 30.000 characters? Think about parsing the content first before you add it to the listbox, so get rid of all the unwanted stuff. By building a regex which will match all the stuff you need than add each match to the listbox/database.
*I made this before any of these new roms came out and as such it was meant for and has been tested on only the stock Gingerbread rom that comes with the phone. I doubt it will be compatible with the new roms.*
In response to a request, I am posting a tutorial on how to make a couple lockscreen mods.
You may want to read my other tutorials first
Swapping Out PNGs
Editing XML
*MY TYPICAL DISCLAIMER!*
I AM NOT A DEV! I just like tinkering with this phone because I'm overall an extremely picky and obsessive person. I have no prior android experience (besides a little tinkering with my X10), and I am in NO way an expert. But since I know how to mess with my phone a little bit and I've been asked to share, I will =) But follow these instructions at your own risk! I am not responsible for the untimely death of your phone, so please be cautious and careful, and if you have any questions about any step, before you try it, ask me or someone who knows! I don't want the blood of your dead phone on my hands! =)
These instructions are for Windows computers. Sorry, I'm just not familiar with mac or linux. =(
**Messing with the lockscreen/framework-res.apk**
Since modding, to me, is about personalization, I’m going to let you pick and choose whatever particular things you like and leave out the things you don’t like. You can get rid of the carrier, but keep everything else, or just get rid of the dots and emergency button, but keep the carrier cause you just love AT&T so much! Whatever tickles your fancy. Unfortunately, with that flexibility comes a teency bit more work =) So I can’t make a framework-res.apk that you can just put with all the mods for a couple reasons:
1.) I don’t know which mods you want
2.) Any other modifications you’ve made to framework-res.apk before will be wiped out if you install one that I upload
So this way, with a tiny bit more work, you can not only pick and choose what you want, but keep the old changes to framework-res.apk you already love so very much.
So without further adieu, here’s what I did to the lockscreen:
I like using the pattern lockscreen for just the touch of security, but I hate how it looks. To me, it's wildly unnecessarily cluttered. So here's what I've done, before and after =)
{
"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 don't like AT&T plastered on it, the divider line is too harsh, the dots are just completely unnecessary to me (I can estimate a third along each axis, thanks =)), and the emergency call button (albeit practical) is ugly, and I'm shallow. So I changed all of them. The dots will still appear, but only after you press them so you can see that beautiful wallpaper of yours while your phone is locked. This included 4 modifications:
1. Removed carrier (edited XML)
2. Lightened divider to almost invisible (I like just a touch of it =)) (edited PNG)
3. Removed dots (edited PNG)
4. Removed emergency call button (edited XML)
Don't worry. The emergency call button (along with the "forgot pattern" button) still returns after you've failed to enter the correct pattern multiple times:
So let’s get started!
**What you’ll need**
1.) Root explorer from the market with root permissions! (I DO NOT suggest an alternative file explorer ESPECIALLY since this mod requires messing with framework-res.apk, the easiest way to brick your phone! And I know other file explorers like ES file explorer will brick your phone if you try to mess with framework-res.apk in this way!)
2.) 7zip or some kind of zip manager for your computer
**What to do**
1.) Using root explorer with root permissions, COPY (don’t MOVE!) framework-res.apk from your phone (in \system\framework\framework-res.apk) to your sd card, and then to your computer. Keep a copy safe somewhere else as a backup in case you want to revert back to your original framework-res.apk!
Decide what mods you want! Here’s the list again:
1. Removed carrier (edited XML)
2. Lightened divider to almost invisible (I like just a touch of it =)) (edited PNG)
3. Removed dots (edited PNG)
4. Removed emergency call button (edited XML)
If you want the invisible dots or the lightened divider, download the attached “PNGS- lockscreen.zip” from the end of this thread.
If you want either the removed carrier or the removed emergency call button, download the ONE XML you want! (If you only want to remove the carrier, only download “XML- no carrier.zip.” If you only want to remove the emergency button, only download “XML- no emergency call button.zip.” If you want both, download “XML- no carrier AND no emergency call button.zip.” You can only use ONE XML. If you try to use more than one, they will just overwrite each other since they’re just different modifications of the same XML file!)
2.) Unzip whichever zips you downloaded onto your computer
3.) Right click on your framework-res.apk from your phone, 7zip-> open archive (do not extract!)
4.) Drag and drop all the unzipped PNGS you downloaded (if any) into \res\drawable-xhdpi in framework-res.apk. Let them overwrite the originals in that folder.
5.) Drag and drop the unzipped XML you downloaded into \res\layout in framework-res.apk, and let it overwrite the original.
6.) Move your newly modified framework-res.apk back onto your sd card
7.) Copy it to \system\
8.) Using root explorer, change permissions for framework-res.apk to owner: read AND write, group: read, others: read! This step is CRITICAL!
9.) Move it into \system\framework and let it overwrite the original framework-res.apk!
10.) Restart your phone!
Upon startup, you should see your new changes! You can also edit the PNGs however you like, if you want to change the dots to something else, or want a big blue divider or whatever. =)
All the XML edits I did were as explained in my editing XML tutorial, but if anyone wants more details or what values in particular I modified, I’d be happy to go through them!
If you need help using root explorer to change permissions, etc, I have more details in my other tutorials listed at the top of this entry.
If you have ANY questions or need more details, before you do anything, PLEASE check my other tutorials or just ask! =)
Worked perfectly! Thanks, it looks so much better than before imo!
Thanks!! Glad you like! I agree, I like using the lock pattern, but I definitely prefer a more minimalist look =)
I like your style. If you got any more mods, don't hesitate to share with the rest of us! Lol.
Can this be used with CM7? I've done things like this already, including taking out the carrier name manually, etc. I used this one xml that you gave and it hosed the phone. Just curious whether or not that xml file is different. Caused a pretty bootloop.
I'm pretty sure this is only for stock roms.
Sounds good. But can you give me a quick rundown on what you edited in terms of the xml file? I can prob go in and do it myself, but I'm unfamiliar with which lines you edited (were the lines for carrier completed deleted? --><TextView android:textAppearance="?textAppearanceMedium" android:ellipsize="marquee" android:gravity="bottom|right|center" android:id="@id/carrier" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip" android:singleLine="true" android:layout_toRightOf="@id/time" android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
^ That line simply removed or did you just remove "@id/carrier" <less the quotes>"
As well as the annoying emergency buttons (this will ensure my wife doesnt get a chance to save me and I can RIP ) - Was the line removed entirely or?
If I know these fine details I can probably wing this. I'll just have to keep my fingers crossed recompiling.
Thanks in advance (don't ya hate that)
ADG
Deleting lines usually made things crash and burn, so I just cheated and changed widths/sizes to 0
To remove carrier (lines 8 and 9), after:
android:id="@id/carrier", changed android:layout_height to "0.0dip"
android:id="@id/carrier_sub2", changed android:layout_height to "0.0dip"
To remove emergency buttons, in the section just above android:id="@id/emergencyCallAlone" (line 24) shown here:
<RelativeLayout android:id="@id/footerNormal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<Button android:textSize="18.0sp" android:textStyle="bold" android:id="@id/emergencyCallAlone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/ic_emergency" android:drawablePadding="8.0dip" android:layout_centerInParent="true" style="@style/Widget.Button.Transparent" />
</RelativeLayout>
Changed the first android:layout_height to "0.0dip"
Hope it helps. And no, I don't hate thanks of any kind. =) You'd be surprised how many just demand
I see (in the xml I downloaded):
android:layout_width="0.0dip" android:layout_height="fill_parent"
for the carrier line. (width, not height) Maybe I'm looking at the wrong file entirely. I apktool'd this xml out from the one I made by adding your xml to the apk.
However, our files differ QUITE alot, so this may be goofier than I imagined. For me, that is. 3 days ago I barely knew what Android was or had ever touched a smartphone. But I'm familiar enough with Linux so I'm comfortable with hosing things to the razors edge of brickdomland. No better way to learn than to tinker with this stuff.
Anyway, I suppose setting width or height to 0 would solve the problem either way, correct? If so, then I'll scan what you've zero'd out and try and find my counterpart. Some of the naming conventions differ a little, but not by much. Attached is my file where you can see the difference if you feel like taking a glance.
I also take it there's something to Relative vs. Linear as it applies to something like this. I'm not sure what the complete difference is, other than Linear is the basic layout Vert x Hor on the page.
I don't know what your lockscreen looks like, so I don't know how the carrier/clock and things are arranged, so I can't say for sure, but I would guess if you changed:
Line 5: after "android:id="@id/carrier"" android:layout_height from "wrap_content" to "0.0dip"
for no carrier
and
Line 21, android:layout_height from "fill_parent" to "0.0dip"
to get rid of emergency call button, that might do the trick...
<grin> I never noticed "page 2" on the bottom right of the web page. Anyyyyway...
My screen looks identical to yours, pretty much per pixel.
And I think I changed exactly what you described. I'm *about* to try it now.
I'm starting to wrap my head around all this, so I'll prob go bananaboats on my phone. And more than I should more than likely.
Testing in 10..9..8...
---------- Post added at 11:59 PM ---------- Previous post was at 11:39 PM ----------
Looks good so far, with exception of the gestures (connect-the-dot security) - Now I can't find where that's enabled. Heyzeus Kristo. Same OS/ROM I was using before and I didn't add anything, so I must be missing it somewhere or I don't know what it's called.
I think I'm on the right path though. Thanks a-million for your help. Truly appreciated. Now I've got to find more things I can change. For no other reason than I simply can.
Update: Found pattern locking. CM7 has its own version as well as Androids native. It was Androids that I was looking for. I'll get all this soon enough.
Update 2: Couple things for people with CM7 for the X2. Setting permissions in /system first, before moving .apk into /system/framework seems to be a must. Otherwise things go bananas. And in every language known to man.
Works perfect, with exception of releasing pattern lock. Little grey directional bars stick around on failed attempt and make screen look bit strange. So make sure (don't know if this was mentioned already, but if it was I apologize) to change the graphic for this (trying to locate it now.)
Update 763: I can't locate the graphic for the grey bar that links the pattern circles. If anyone knows, please feel free UNless it's some kind of java routine or css hoopla.
Yeah, I can't stress that enough. Setting permissions BEFORE replacing the original apk, but after putting into /system/ is absolutely essential! Trying to do it AFTER CAN brick your phone! Not just on the X2, but on the Nitro too! TRUST ME. IT CAN =)
Ya, I thought it was all over for me the first time. Fortunately I remembered the restore-a-thon function. But I did learn some Russian and a few other languages trying to decipher all the app quits in 27 different languages after blind copying the apk into Framework. Ah, happy days.
AAHH! I can't thank you enough for this one. My girlfriend got the phone and pocket dialed 911 8 times in one day. Needless to say the last time they were pretty pissed off. The removing of the emergency button saved her!!!
A couple of questions, I take it if I do a factory reset that the fix will remain in place, but if I were to install a custom rom it would then be removed?
Thanks again
Great! Glad it helped! To answer your questions, yes and yes. It will stay if you do a factory reset, but a custom rom will remove it. But even on a custom rom, it's a simple mod. The framework-res.apk I posted may not work for a custom rom, but if you decide to try one, if you send me the framework-res.apk of that rom, I can edit it really easily to get rid of the button and send you that version of it.
edit* Actually, now that I remember, the mod only requires that one XML edit, so it's actually very possible it will work fine with custom roms, but if you send me that keyguard_screen_unlock_portrait.xml from whatever custom rom you choose, I can always check and edit it really easily. OR, if you're feeling adventurous, you can decompile the XML (as described in my XML editing tutorial), and I can point out what edit you need to do to get rid of the button so you can do it for whatever rom or android phone you get in the future! =)
Okay thanks I forgot to mention, I just rooted on the phone, do you know what would happen if i left this and did a hard reset? Do you see that being a problem now that I have already modified the file? Or would everything go smooth?
I'm not sure what you mean. What would happen to your phone if after you used the mod to get rid of the emergency call button, you did a hard reset? I doubt it would have any effect besides resetting your phone. I think the emergency button would still be absent, but I'm not 110% sure. I can't imagine anything would go wrong, but try not to hold it against me if something bizarro happens (though again, I can't imagine it would...)
divider
No replace images... just edit de xml
go to
"@id/divider"
and define
android:layout_width="0.0dip"
android:layout_height="0.0dip"
adg100 said:
Update 763: I can't locate the graphic for the grey bar that links the pattern circles. If anyone knows, please feel free UNless it's some kind of java routine or css hoopla.
Click to expand...
Click to collapse
I found it!! =) It's in the smali com/android/internal/widget/LockPatternView.smali, .line 266 and .line 835, there are settings for color (in hexadecimal) and alpha/transparency (also hex). I thought I'd touch up my lock pattern lines =)
from
to invisible lines (alpha set to "0x0")
"If you can't explain something simply, you don't know it well enough" -Albert Einstein
There are a ton of guides available for theming, but I have always found most to be either a) erroneous b) way over complicated or c) out of date. I'll try to keep this simple, easy to understand, and up to date.
Introduction
There are 2 main ways to theme. You can choose the more powerful “zip” style that gives you complete control but is more difficult and time consuming to maintain, or you can choose the “theme chooser” method that is much easier to maintain, but is more limited. A lot of themers will do a theme chooser apk and supplement it with an additional zip file that finishes things the theme chooser cannot. That’s what i do. I recommend Linux for theming since more of the advanced concepts are best done on linux. (Git, source building, etc) For the purpose of this guide, I’ll use my Elegant Dusk as a reference and Ubuntu 12.04 as my distribution of Linux.
Decompiling
Without building directly from source, you'll need apktool to decompile apps. We'll use Apkmultitool for this, since it will sign your apps with a debug key so you can actually install them to your device.
Download this ApkMultiTool, (Choose the "Linux Version 1.0" at the bottom) then extract it to your desktop, then rename the folder ApkMultiTool.
Once extracted, open a terminal and go to that directory by typing
cd /Desktop/ApkMultiTool
Click to expand...
Click to collapse
Now, we need to make the script executable. From the open terminal, type
chmod 755 Script.sh
Click to expand...
Click to collapse
then type ./Script.sh to execute it.
If you got an error about optipng and sox are not in your path, simply open another terminal and run this:
sudo apt-get install optipng p7zip-full sox
Click to expand...
Click to collapse
You should get a menu like this:
{
"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"
}
Now, we need to patch the aapt to the newest version. In your Android SDK folder, look in the platform-tools folder and grab the aapt file from there and place it in the /other folder in ApkMultiTool. This ensures you have the latest aapt (Android Assets Packaging Tool)
Minimize that and place ElegantDusk.apk into the place-here-for-modding folder. Then maximize the script and choose option 9 to decompile. You should now have a /out folder with several things in it. This is our project folder to begin theming. Navigate to /out/res and let's begin.
Working with Images
First, you'll need an image editor. Since we're using Linux, i recommend the GIMP. Open a terminal (Ctrl + Alt + T) and run this:
apt-get install gimp
Click to expand...
Click to collapse
Once that's done, launch gimp (either from the dash or by typing gimp into a terminal) and we're ready to theme. I can't get into a full GIMP tutorial here, but that will get it installed, and you can either play with it or find some of the zillion gimp tutorials.
Ok, you've edited an image and are ready to test it on your phone. Let's say you want to change the settings background. That's controlled by frameworks_res_background_holo_dark.png in the drawable-nodpi folder of my theme. Change it however you want. If you're done and ready to compile, refer back to the recompile section above. Or, continue on for more tips.
What the heck is a .9.png file?
Android has devised a method of special metadata that can stretch an image in certain ways so it doesn't have to store tons of large image files in it's resources. In other words, it's an optimization technique. We can edit these easily within GIMP, or we can redraw them with a tool that comes with the AndroidSDK called draw9patch.bat. It's in the /tools folder. Let's look at one.
See the 1 pixel black lines around it? The position of that tells android how and where to stretch the image, as well as where content (ie text) can be displayed inside it. The top and left sides tell android where to stretch and the bottom/right tell it where content can be displayed. As we see, content can be displayed everywhere, and the image is stretched in only a small part. For theming, you NEVER want to touch the black lines, so when you change something inside (the gray area), make extremely sure to never alter them in any way. It will cause literally dozens of compile errors with no warning as to which file caused it (a huge pain).
Working with XML
XML (eXtensible Markup Language) is the primary code language we'll be dealing with in theming. There are a TON of programs that can edit xml, but since we deal with it a lot, it's good to get one that looks nice and has syntax correction. I recommend Sublime Text 2. Let's install it with these 3 commands. Run them seperate.
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text-2
Now let's look at a simple XML. Go to /res/values/colors.xml and open it with sublime text. (Right click>open with) You'll see this:
The values are on the right side listed as #ffffffff or similar. These are hexadecimal ARGB color codes. Each set of 2 letters/numbers represent something. The first two (Alpha) are the transparency. FF means fully opaque and 00 means fully transparent. 50 would be 50% transparent. The next set of two (R) represent the red value, or how much red is in the color shade. Again, FF is fully saturated pure red and 00 is no red at all. The same applies to the next two sets. (Green and Blue) This makes up ARGB, so the example of #ffffffff would be fully opaque and full colors of red, green, and blue, which make white. So the hex for white is #FFFFFFFF.
ICS Blue is #ff33b5e5, just in case you are wondering.
Change any values you like, and then simply hit save at the top menu.
Ok, so what about changing more than just colors that were already there? Read on:
Let's say you wanted to change an entire style. I'll use MMS as an example. There are tons of "inverted MMS" apps out there, mainly because it is one of the easiest apps to invert. We want to change the light style to a dark style, so how do we do that? There are a handful of edits we need to do, but since we are concentrating on styles, let's start there. Open /res/values/styles.xml and search for theme.holo.light.darkactionbar. Found it? Change it to theme.holo (so, delete the .light.darkactionbar part) we've just told MMS to use the android "holo" style, which is dark with white text. There's a lot more to it, but this is a simple example of redirecting styles within an app.
Compiling
This is where it gets fun. There can be a lot of errors at this point so be patient. After you've edited your images and .pngs you need to pack it all up again. Maximize your script.sh again and choose option 10 for compile. If you need, scroll up when it's done to see if it built ok. It should look like this:
Odds are you might get some errors at this stage, so copy the log and post it in a pastebin or similar and i'll try to help as time permits. If no errors, you now need to sign it. If you look in the place-here-for-modding folder, there will now be an unsigned apk waiting. After choosing option 11 to sign, it will change to a signed apk, and you can rename it whatever you like and install like a regular app.
that's why i'm trying to set up a build environment to compile directly from source (without success for now hehe).
apktool is powerful but not enough, it causes many FCs with some APKs (deskclock, camera, contacts, etc..)
Not yet. I've even figured out how to make the dialer transparent. Too bad there is no easy way to compile it other than from the source.
Is there a tutorial somewhere on how to build contacts from source? I'd really really really like to have it in my theme
Sent from my Galaxy Nexus using xda premium
i don't know exactly. you have to use linux for sure, then update jdk, download android sdk and so on..then sync with aokp github and compile. but in fact it's a little harder than i explained lol. there's a lot of guides but no one is complete and updated, i tried many of them but every one has some missing part and i can't proceed somehow.
we should find some dev that spends a little time to explain the fundamentals of compiling from source, then we can help each other with it.
artvandelay440 said:
Is there a tutorial somewhere on how to build contacts from source? I'd really really really like to have it in my theme
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
The only way to build one apk is, you need to make a full rom build first and then you can do a command for one apk. I was in the same boat and trav posted his contacts source and I told someone what xml's I wanted edited (to get rid of blue text) so that person built me the apk and I handled the images on my end cause I'm able to decompile/recompile contacts without errors (but yes phone F's me) so after compile of apk and my images I just 7zip them into the built one. You guys are more than welcome to kang the contacts/phone apk's (un holo'd) from my themes if it'll help (link in sig).
good day.
I am content with the way things are until the Theme Chooser gets updated for ICS. Theming will get so much easier then .
I would also be interested in a guide for compiling apps from source
chopper the dog said:
The only way to build one apk is, you need to make a full rom build first and then you can do a command for one apk. I was in the same boat and trav posted his contacts source and I told someone what xml's I wanted edited (to get rid of blue text) so that person built me the apk and I handled the images on my end cause I'm able to decompile/recompile contacts without errors (but yes phone F's me) so after compile of apk and my images I just 7zip them into the built one. You guys are more than welcome to kang the contacts/phone apk's (un holo'd) from my themes if it'll help (link in sig).
good day.
Click to expand...
Click to collapse
Thanks, i think i'll do that. Your theme colors are more fitting than what i have now. I'll be compiling a full rom on a spare virtual machine today, and if by some miracle, it works, then i can post source to it as well.
artvandelay440 said:
Thanks, i think i'll do that. Your theme colors are more fitting than what i have now. I'll be compiling a full rom on a spare virtual machine today, and if by some miracle, it works, then i can post source to it as well.
Click to expand...
Click to collapse
Any of the colors in those is handled all with images. I had the apk built with all the blue.holo text changed to 9a9a9a so that it could be a neutral theme. I just edit .9's and other images for multiple themes and use same apk base.
good day.
chopper the dog said:
Any of the colors in those is handled all with images. I had the apk built with all the blue.holo text changed to 9a9a9a so that it could be a neutral theme. I just edit .9's and other images for multiple themes and use same apk base.
good day.
Click to expand...
Click to collapse
Ah, so technically, i could use 7zip to simply replace the images i want. Wouldn't that cause issues with .9 images, since they need to be compiled again to be drawn correctly?
artvandelay440 said:
Ah, so technically, i could use 7zip to simply replace the images i want. Wouldn't that cause issues with .9 images, since they need to be compiled again to be drawn correctly?
Click to expand...
Click to collapse
That's were I was saying I have no problems de/recompiling contacts so I use a sacrificial apk to decompile make all image edits compile and 7zip image folders into working apk.
good day.
chopper the dog said:
That's were I was saying I have no problems de/recompiling contacts so I use a sacrificial apk to decompile make all image edits compile and 7zip image folders into working apk.
good day.
Click to expand...
Click to collapse
Just tried your apk and it's perfect for minimalist themes .
Can you also please get rid of the blue strip on the top of the call screen or is that in Phone.apk?
chopper the dog said:
That's were I was saying I have no problems de/recompiling contacts so I use a sacrificial apk to decompile make all image edits compile and 7zip image folders into working apk.
good day.
Click to expand...
Click to collapse
That worked perfectly- thank you.
sonnysekhon said:
Just tried your apk and it's perfect for minimalist themes .
Can you also please get rid of the blue strip on the top of the call screen or is that in Phone.apk?
Click to expand...
Click to collapse
I need to figure out where that edit is at and have my smarter than me friend build me an apk. It has annoyed me but laziness has prevailed.
good day.
chopper the dog said:
I need to figure out where that edit is at and have my smarter than me friend build me an apk. It has annoyed me but laziness has prevailed.
good day.
Click to expand...
Click to collapse
It's in wither framework or systemui, that i know. (i'm thinking systemui) Here's how it turned out. And i can build phone.apk just fine if you need as well.
i'd love a contacts.apk without that bastard dividers between contacts..
got rid of all of them in framework and phone.apk but that one is in values\colors.xml and can't be removed (yet)
artvandelay440 said:
It's in wither framework or systemui, that i know. (i'm thinking systemui) Here's how it turned out. And i can build phone.apk just fine if you need as well.
Click to expand...
Click to collapse
Sonny was referring to the blue strip at the top when you place a call. But that cap looks sweet.
good day.
chopper the dog said:
Sonny was referring to the blue strip at the top when you place a call. But that cap looks sweet.
good day.
Click to expand...
Click to collapse
oh- this one? if so, look in phone apk /res/values/styles/<color name="incall_call_state_label_background">#80fd9000</color>
Yup. Yay laziness paid off. Thanks
good day.