battery meter theming - Captivate Q&A, Help & Troubleshooting

I just recently installed a new theme with the battery meter showing percentages in the notification bar (rooted Captivate running stock 2.1). To learn more about themes, I was poking around at the framework-res.apk files - comparing the original backed-up file with the one that was in the new notification bar package.
It seems the stock battery icons were in 20% increments, so there were files like stat_sys_battery_20.png, stat_sys_battery_40.png, etc.
On the percentage battery framework, there were a lot more files with names like stat_sys_battery_20.png, stat_sys_battery_21.png, etc.
Obviously one file for each meter increment you want. My question is: Is that all it takes to set up a battery meter? i.e., if I want to create a battery meter in, say, 10% increments - all I have to do is create one for each increment and save it in there? Is there no place else that I have to define whether there will be 5 battery icons, 10 battery icons, and which file corresponds to which battery level read by the system? Or is just the filename enough for it to figure out which battery icon goes with which battery level?

So does no one know or did I do a really crappy job of asking my question?

MobileNick said:
So does no one know or did I do a really crappy job of asking my question?
Click to expand...
Click to collapse
Yes.
. . . . .

LOL ... no... no such thing as a stupid question - only stupid posts like I BRICKED MY PHONE (because... they didn't read the Q&A sticky)
But I don't know if I can answer your question with 100% accuracy.
It is true that you need 100 images to indicate the % increment vs. the 5 used for the 20% increment (if my math is off... IDK I fail at basic math )
... The part I'm not sure if it is needed is if the framework-res.apk has *.xml edits so that it recognizes the use of those images.
Best thing to do is test (which I can see you have it installed) and find out if it works without doing the *.xml edits.

avgjoegeek said:
... The part I'm not sure if it is needed is if the framework-res.apk has *.xml edits so that it recognizes the use of those images.
Click to expand...
Click to collapse
Thanks for the info! This point what I was thinking about. i.e., is it enough to just stick the appropriate images in there or does there have to be some kind of reference that says for example 83% battery corresponds to the file labeled stat_sys_battery_83.png
Yes, I did install the % meter. However, I installed it as an update.zip, so I'm not sure all the little changes - such as the .xml edits - that may have happened in the background. I can try to compare the other files with the stock framework.

Related

Battery display in status bar

Is there anyway to just change that without having to install a whole different rom? Thanks!
What do you mean?
I was wondering something similar (i think), that would put a percentage on the already existing battery meter. Much like the battery status app that you can download off the market.
Is that what you mean?
The battery would always be there. If you want something like a percentage then you would have to download an app from the market but the original battery will always be there.
He wants there to be a different battery color or design or something, am I correct? To find the answer to the question I would ask one of the many theme devs, they're the one's that would most likely know something about this.
You can change the battery icon in the status bar by editting the framework\res\drawable battery icons. There are only 7 of them tho, so putting in a percentage wouldn't really be feasible. You can do it, but the icons are set by the system to change only at certain intervals. They are:
100%
80%
60%
40%
20%
10%
0%
You can change the icons for each of the listed percentages. Or you could make it a written percentage in 20% increments.
the rom/theme I am using has the regular horizontal battery meter, but I like the round one and was wondering if there was any easy way of just changing that
Change the images in the framework\res\drawables.

Battery Percentage on Froyo

Anyone know how to get the battery percentage to show in the battery icon in Froyo? Thanks.
moved to Q&A
cant happen until froyo source is out.
You can, but not perfect
I too wanted the percentage in the battery. In the development thread you'll see that the phoenrom has it included in the rom. I ended up making my own custom rom with the kitchen made by dsixda just to get that damn percentage in the battery icon! Its also not a very accurate measurer of percentage as it only works in percentages of 10(40,50,60etc). I still like it though.
Now that the source is out,
I tried to apply the bat. %, but failed.
I edited the xml to link to the pngs from 0 to 100.
I edited the PNGs.
Compilation warns me about bad pngs and when I reboot, the framework is totally messed up or even worst, as I unlock my phone, it just reboots...
Any help on how to do this?
I use Battery Widget (free). Takes up one icon space on your home screen (shows battery percentage in 1% increments), also allows quick toggling of Wifi/GPS/Bluetooth, and access to Screen settings.
RashaMatt said:
I use Battery Widget (free). Takes up one icon space on your home screen (shows battery percentage in 1% increments), also allows quick toggling of Wifi/GPS/Bluetooth, and access to Screen settings.
Click to expand...
Click to collapse
You know it has been released, no?
Check to forum: a simple jar to push

How can I swap ?

Hi all,
I've made my own "theme" (the word is a bit exaggerated) by using DHD-PowerControl-1.72.405.2_notxt and cook it with UOT.
The result is in blue in the screen below.
But, I'd like to swap it with the one made with the one made by he_stheone64 in PowerNotificationWidget2.2.1 (see the red rectangle in screen below).
The problem is that PowerNotificationWidget2.2.1 changes other things I wouldn't like to be scrashed (like icons above or non-transparent carbon-look background below).
Then I tried to do the same of what I did for the white one : cooking framework-res.apk. But I had the long error log you can also see below.
So, could someone help me to do that swap and perhaps if possible, make the little bars below each toggles a bit more green than blue.
Thanks for your help,
Lim.
I'm working on something similar as well - a notification bar power control, based on the latest 2.1.1 services.jar and the customisation app. The idea is that it's as close to stock framework as possible, so that it can be uploaded to UOT (or otherwise themed with metamorph etc.).
This is mainly just a learning exercise for me in decompiling and modifying files, but if it works I can share it. I find the toggles show up better on a black background than a white one, so hope to include black background as an option - though I think that might break compatibility with UOT kitchen, so there might have to be 2 versions. It's a work in progress, though, depending on my free time, so I can't promise when it'll be done. I'll post here if I get it working though!
preacher65 said:
I'm working on something similar as well - a notification bar power control, based on the latest 2.1.1 services.jar and the customisation app. The idea is that it's as close to stock framework as possible, so that it can be uploaded to UOT (or otherwise themed with metamorph etc.).
This is mainly just a learning exercise for me in decompiling and modifying files, but if it works I can share it. I find the toggles show up better on a black background than a white one, so hope to include black background as an option - though I think that might break compatibility with UOT kitchen, so there might have to be 2 versions. It's a work in progress, though, depending on my free time, so I can't promise when it'll be done. I'll post here if I get it working though!
Click to expand...
Click to collapse
Hi Preach,
So far, I managed to swap the toggles png's (taking png's from he_stheone64's file) but no way to find and put the black background.
I would also like to have the little bars below more green than current blue. For this I guess it's in an xml file, but can not find which one (and how to do).
Liamstears told me there's was a mistake he_stheone64 could fix, but it's seems not to the case. He also told me he could help me to fix that, but he certainly doesn't have time.
I don't know in which direction to go but if you have any idea, I would be happy to make tries with you.
Good luck
I made for myself something like this It is a little bit tricked but effect is like on screen. This mod has no transparency in notification but it looks as STOCK as possible cause i prefer stock one
To change colour of those indicators u use app (which is installed with PowerMOD) U got there color picker. With bacground it`s not so easy thats why i tricked it a little removed bacground of toggles (made it transaprent) and set up whole notifiacion with chosen background and effect U see is below:
Will post this mod in my thread tommorow if somebody will need this
Krzysiec said:
I made for myself something like this It is a little bit tricked but effect is like on screen. This mod has no transparency in notification but it looks as STOCK as possible cause i prefer stock one
To change colour of those indicators u use app (which is installed with PowerMOD) U got there color picker. With bacground it`s not so easy thats why i tricked it a little removed bacground of toggles (made it transaprent) and set up whole notifiacion with chosen background and effect U see is below:
Will post this mod in my thread tommorow if somebody will need this
Click to expand...
Click to collapse
Hi Krzysiec,
This is exactly what I'm looking for (and probably the same for Preacher65).
As I can see, your framework-res.apk is cookable in UOT (battery).
Below notification, you manage to keep carbon background instead of white background, is it made with the same tweak ?
Tell us when you post this mod
I`m afraid my mod isn`t compatibile with UOT ... only leamstear framework-res.apk is cookable in UOT. All thing I do is manually changed by me. It is the easiest way for me Guys cook in OUT icons U want and than manually mix them with for ex. my mod. Thats easiest way I make all my icons/mods/ manually automat will never generate icons I like Will post it as soon as possible. The trick is I set up ONE bacground for notification and Power mod ... this is only ONE SINGLE background ... PowerMod background is transparent so wee se background from notification (which is carbon one) So when U slide up notification area U see how background moves behind Toggles But in static position it looks like on the screen (for me PERFECT and AS STOCK AS POSSIBLE)
Krzysiec said:
I`m afraid my mod isn`t compatibile with UOT ... only leamstear framework-res.apk is cookable in UOT. All thing I do is manually changed by me. It is the easiest way for me Guys cook in OUT icons U want and than manually mix them with for ex. my mod. Thats easiest way I make all my icons/mods/ manually automat will never generate icons I like Will post it as soon as possible. The trick is I set up ONE bacground for notification and Power mod ... this is only ONE SINGLE background ... PowerMod background is transparent so wee se background from notification (which is carbon one) So when U slide up notification area U see how background moves behind Toggles But in static position it looks like on the screen (for me PERFECT and AS STOCK AS POSSIBLE)
Click to expand...
Click to collapse
This would be good for me as well
MOD is up in my thread Take a look into OTHER MOD SECTION at the bottom of 1st post. Cheers!
Krzysiec said:
MOD is up in my thread Take a look into OTHER MOD SECTION at the bottom of 1st post. Cheers!
Click to expand...
Click to collapse
Ok I downloaded your PowerNotificationMod by Krzysiec but it doesn't look like your screen above (see mine below, where there is the carrier and the DesireHD mark at the bottom).
And I have to find a way to include the icons (see other screen) I cooked from UOT which has more than battery icons..
LOL Wrong file Will fix it in a minute
About icons... just pull them off from framework-res U cooked in UOT and drag and drop into my framework For battery U must replace all needed files and three compiled xml if U got different animation than BASIC from UOT.
Krzysiec said:
About icons... just pull them off from framework-res U cooked in UOT and drag and drop into my framework
Click to expand...
Click to collapse
Ok, for this, I can search for all the considered icons by comparing with the one shown in UOT and I guess they will crush over the existing stock one.
Is that right ?
Krzysiec said:
For battery U mast replace all needed files and three compiled xml if U got different animation than BASIC from UOT.
Click to expand...
Click to collapse
I'm not sure to understand what you mean.
My battery icons are the one you see in my previous screen called "Version B, White numbers". So I think this is the basic from UOT. Aren't they ?
If not what are these 3 compiled xml and from wher do I take them ?
EDIT : I saw that you updated your thread at 14:55 (CET) so I thought you updated the file. But it's still the same look... Perhaps you didn't update ?
Fixed version (i hope so) is UP try it out
About icons...
Unpack framework-res.apk and go to res/drawable-hdpi(-v4) folder. U got there every signle icon. Names of them are the same as mine (they must be the same to sytem recognize them via xml)
For battery:
U will see plenty of icons in res/drawable-hdpi(-v4) folder too... as many icons as percentage in Your battery U will see it when U unpack Your framework.
About XMLs U need to pull three xmls from Your cooked UOT framework from res/drawable:
-stat_sys_battery.xml
-stat_sys_battery_charge.xml
-zzz_stat_sys_battery_1.xml
Those files are responisble for whole battery indicator. Just replace them with Your cooked one.
EDIT: should be fine now :/ YEs it was updated than ... Hmmm strange ... Wait a sec.
It must work: http://dl.dropbox.com/u/17626742/Programy/PNotificationMODKrzysiec.zip
Checked graphic and there`re no more graphic like on screen (they were there at start but not now).
If in some way U won`t get it to work... Install my PureBlack skin and use it ... This will DEFINITELLY change those graphic. But How i said there no way to still have those hraphic there. Will check again for sure.
THIS ONE MUST WORK!
There`s no ..... way to not work
http://dl.dropbox.com/u/17626742/Programy/PNotificationMODKrzysiec.zip
LOL, I promise I took the link from your post above, put the file in my DHD, flash it in CWM, reboot and took this picture below
EDIT : I cleared my cache, DL again, and same file seems to have different amount of bytes. I try again.
Just fresh flash (16:07) on mine and it looks like this (default skin):
I don`t know what`s wrong than :/ Maybe U flash all the time the wrong file which have the same name?
See my EDIT above : same name of file => so kept in FF cache.
Cleared cache, last file a bit bigger. Flashing now.
Limerick_fr said:
See my EDIT above : same name of file => so kept in FF cache.
Cleared cache, last file a bit bigger. Flashing now.
Click to expand...
Click to collapse
That`s definitely reason FF tought it was the same file so didn`t downloasd it again. CHROME makes it too saomtimes.
Yep this is great now. Thank you very much !!!
I'll have to focus now on how to put the icons from UOT now... I'll show you the result when I will succed... if ever
Limerick_fr said:
Yep this is great now. Thank you very much !!!
I'll have to focus now on how to put the icons from UOT now... I'll show you the result when I will succed... if ever
Click to expand...
Click to collapse
Extract two framework-res.apk from my and UOT... Put them in different folders. Than pull via WinRAR /res/drawable-hdpi-v4 from both (in their folders) Than mix graphic U want from Yours into mine and but them back into framework-res.apk of mine ... U don`t have to sign anything. After mixing put "new" frameowrk-res.apk into my zip and viola!
Of course i`m talking about statusbar icons only because if U change whole folder U won`t get effect like on screen U must see te structure of drawable-hdpi
If U like my battery animation do not change xmls i mentioned earlier If U don`t like it change them from Your UOT framework
PS. Now U understand HOW I DID THE TRICK with carbon background in my mod
Krzysiec said:
Extract two framework-res.apk from my and UOT... Put them in different folders. Than pull via WinRAR /res/drawable-hdpi-v4 from both (in their folders) Than mix graphic U want from Yours into mine and but them back into framework-res.apk of mine ... U don`t have to sign anything. After mixing put "new" frameowrk-res.apk into my zip and viola!
Of course i`m talking about statusbar icons only because if U change whole folder U won`t get effect like on screen U must see te structure of drawable-hdpi
If U like my battery animation do not change xmls i mentioned earlier If U don`t like it change them from Your UOT framework
PS. Now U understand HOW I DID THE TRICK with carbon background in my mod
Click to expand...
Click to collapse
Thank you so much.
I'm on many things at the same time.
I'll do it when more quiet tonight.
Yes I'd like to keep the circle battery I had because i think we see more easily...
Preacher65 will also be happy of all that
I`m glad I could help U guys Some people helped me ... I helped some people... thats real comunity

[TOOL][8/14/11]BatteryIconMaker-Generate % battery icons.Vertical,Horizontal,Circular

8/14/2011 Update: See this post for details. Now you can make circular progress bars, dotted progress bars, the text is anti-aliased and smoothed, and more!
Attached is a very simple, small Windows .NET application that will generate a 101 Battery Icon images (for percentages 0-100) with a growing battery indicator bar and also the battery percentage text using the font, style, format and position that you desire.
Using an XML configuration file and some image templates, you can quickly generate a wide range of icons for your battery icon theme.
To start, just unzip the files into a folder and open up the "Config.XML" file in a text editor. Here's the one I've included to use as a guide/template/example:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<batteryIcon>
<output folder="output" filename="stat_sys_battery_{0:0}.png" />
<batteryLevels>
<level max="24">
<background filename="Files\template.png"/>
<bar startX="6" startY="21" endX="31" endY="21" filename="Files\bar-red.png"/>
<pctStyle colorRGB="FFFFFF" fontFamily="Arial" fontSize="11" italic="false" bold="true" formatString="{0:0}%"/>
<pctPosition centerX="true" centerY="false" offsetX="1" offsetY="3"/>
</level>
<level max="49">
<bar filename="Files\bar-orange.png"/>
</level>
<level max="74">
<bar filename="Files\bar-green.png"/>
</level>
<level max="100">
<bar filename="Files\bar-blue.png"/>
</level>
</batteryLevels>
</batteryIcon>
In addition, in the "Files" folder, I have an example image called template.png, which is the example icon's background image, and some bar-xxx.png images, which are different colored 1-pixel-wide images that are used in the example to draw the horizontal battery meter over the background. Attached to this post is a picture of the output from this configuration and image files so you can get a basic idea of what it can do.
Using this application is (hopefully) quite simple: Create your template images, edit the config file to specify your parameters, then run the executable. 101 images, for battery levels 0-100 percent, will be created as specified. Tweak and run again as needed until you get it right. The "level" elements allow you to change any of the icon's characteristics (text color, size, position; background image; progress bar image) for different battery level intervals. Anything not changed from the previous level is carried over, so you only need to specify changes.
For most of you, editing the config.xml file is probably obvious from the example; you can probably just tweak it file and get what you want, but below are more details.
Documentation
The output element just indicates where the final images will be stored and how they will be named. The {0:0} part is a standard .NET format string and indicates where and how to put the battery percentage in the file name. (You probably won't need to change this; {0:0} will format numbers from 1-100, no leading zeroes, and we don't need to worry about commas or decimal places or anything).
After that, under the batteryLevels element, there are a series of level elements that define the icon options at each battery percentage interval. The end of the interval is defined using the "max" attribute, which is a number from 0-100 for the battery percentage.
The first level should include all layout and image and formatting options, but then after that, you just need to specify things that change from the previous interval. The level elements should go in order from lowest battery level to highest.
At each level, we can specify:
The background element which sets the base background image for the icon, on which the progress bar and pct text will be overlayed.
The bar element which determines how the progress bar is drawn over the background. startX/startY and endX/endY are the range of positions for which the progress bar image will be drawn. The image should be 1 pixel tall or wide, depending on if the bar is progressing vertically or horizontally. Omit this element completely if you do not wish to draw a progress bar -- i.e., for just the battery percentage text on top of one or more background images.
pctStyle lets you theme the battery percentage text a bit. formatString is a .NET format string, and is probably fine as is, except notice that it ends with a % symbol. Remove this if you don't want a % after the number. (i.e., it would be just "{0:0}")
pctPosition is used to indicate where on the background image the text is drawn. centerX/centerY are true/false if you want the text to be centered in that dimension, otherwise it is drawn at the top and/or left of the background. offsetX/offsetY let you move the text up/down or left/right pixels as needed from either the center or top/left position.
That's really it. Anything that doesn't change from the previous battery level will be carried over, so you just need to specify what has changed.
Tweak the XML file and re-run until you get the battery icons you are looking for! You can also create and drop different configuration XML files on the executable (or specify the file via the command line as the first argument) and it will run using that file as opposed to the default "config.xml" file in the application directory.
Additional Notes:
Specify an empty string ("") for the filename attribute of the bar element if you do not want a progress bar drawn.
Specify an empty string ("") for the fontFamily attribute of the pctStyle element if you do not want the percentage text drawn.
Remember that the background image can change at any interval as well, if you'd like to use a series of different backgrounds with percentage text overlayed and no progress bar, for example.
the start/end positions of the progress bar should be specified once and cover the entire range of the progress bar, from 0-100 %, and not change at different intervals (unless that is an effect that you want for some reason).
You can specify the filename for any valid configuration file as the single parameter for the executable to use that file instead of the default config.xml file if you like.
WOW! Are you kidding me. You mean I don't have to make 100+ Battery icons. THANKS. I'll definately be donating next time I get paid. DO YOU REALIZE how much time you just saved me? Thanks. DL'ing now.
EDIT: DUDE! Where's your donation link? I just tested this and IT'S INSANE! IT WORKS PERFECT! Seriously, post a donation link. You deserve a lot for making this. I'll also post a link to your thread at "themikmik.com". They'll love this program.
EDIT: Could you please give me an idea of what pctposition I would need to accomplish this type of battery? Thanks. I tried a pct of 1:1 but had an FC. Or Offest. I'm still trying to figure it out.
EDIT: I almost have it down. offsetX="3" offsetY="10"/> gives me:
Will the Font be transparent? Answer: YES
I finally got it looking the way I wanted. I used:
<bar startX="10" startY="15" endX="31" endY="15" filename="Files\bar-red.png"/>
It looks like I just have to modify the PNG bar's to make it the size I want so it fills up the battery.
To think, it took me 20 minutes to do TWO battery PNG's in Adobe photoshop! LOL.
How can I change which way the bar is going? It currently goes from Left to right. I'd like it to go from Left to Right.
Answer: I feel like an air-head. I figured it out. You just have to reverse the Start X. For example:
<bar startX="33" startY="9" endX="7" endY="9" filename="Files\bar-red.png"/>
Great!!!!
THX for this tool
Made my life much easier
raider3bravo said:
It looks like I just have to modify the PNG bar's to make it the size I want so it fills up the battery.
Click to expand...
Click to collapse
Yeah, those images are just examples, modify as needed. Glad it is working for you!
jsmith8858 said:
Yeah, those images are just examples, modify as needed. Glad it is working for you!
Click to expand...
Click to collapse
Can you give me an idea of some fonts we can use? I was thinking if I used a certain font that wasn't on the phone then it might not show.
EDIT:
On another note, I'd like to share with everyone the coding I used to achieve a perfect battery using a 38x38 icon and 1x21 bar colors.
Never before have I been able to custom make batteries this fast. Thanks!
Code:
<?xml version="1.0" encoding="utf-8" ?>
<batteryIcon>
<output folder="output" filename="stat_sys_battery_{0:0}.png" />
<batteryLevels>
<level max="24">
<background filename="Files\template.png"/>
<bar startX="34" startY="8" endX="6" endY="8" filename="Files\bar-red.png"/>
<pctStyle colorRGB="A7CEA7" fontFamily="Arial" fontSize="11" italic="false" bold="true" formatString="{0:0}"/>
<pctPosition centerX="true" centerY="false" offsetX="2" offsetY="9"/>
</level>
<level max="49">
<bar filename="Files\bar-orange.png"/>
</level>
<level max="74">
<bar filename="Files\bar-green.png"/>
</level>
<level max="100">
<bar filename="Files\bar-blue.png"/>
</level>
</batteryLevels>
</batteryIcon>
raider3bravo said:
Can you give me an idea of some fonts we can use? I was thinking if I used a certain font that wasn't on the phone then it might not show.
Click to expand...
Click to collapse
Use any font you have available on your pc that looks good. On your phone it's just a PNG image, it doesn't matter .
HTC style battery meter
I modified HTC battery png files to include the battery percentages.
Attached is the preview and output folder. Use as you please.
It would be awesome if we could get the charging icon pngs. Anyone care to post?
Sent from my ADR6400L using XDA Premium App
raider3bravo said:
It would be awesome if we could get the charging icon pngs. Anyone care to post?
Sent from my ADR6400L using XDA Premium App
Click to expand...
Click to collapse
Attached are all HTC battery pngs including the charging ones.
I just made another battery icon. This program is a huge time-saver.
When I asked about the power widgets. I was wanting to know if it's possible to include those images in the battery icon similar to the numbers being populated in the icon. The battery power widgets are easy to get but populating them inside a battery icon can be tricky and again time consuming. Just putting the thought out there. I'm happy the way it is, but maybe consider it for a future update?
raider3bravo said:
I just made another battery icon. This program is a huge time-saver.
When I asked about the power widgets. I was wanting to know if it's possible to include those images in the battery icon similar to the numbers being populated in the icon. The battery power widgets are easy to get but populating them inside a battery icon can be tricky and again time consuming. Just putting the thought out there. I'm happy the way it is, but maybe consider it for a future update?
Click to expand...
Click to collapse
I'm afraid that I don't really understand what you are requesting, can you be a little more specific or explain a bit more what you are trying to do?
jsmith8858 said:
I'm afraid that I don't really understand what you are requesting, can you be a little more specific or explain a bit more what you are trying to do?
Click to expand...
Click to collapse
Sure thing. Right now, the script populates 100 icons. However, there are 110 "battery icons." The other 10 are for charging. What I'm requesting is if the script could somehow, populate those charging icons along with the modified battery png's. I can easily add the charging icons but theming them will be a huge hassle. If it's possible, great. No big deal if it can't be done right now. I'm just thankful we have this script to make all 100 Png's.
How do I compress series png files as 1png file?
I'm running MIUI galnet 6.0 and need to add 1 png file that has all the percentage inside (0-100)
Do you guys know how I need to do this?
Thanks
This is amazing! Why doesen't everyone use it! Please create charging and different types of batteries like circular ones!
Circle battery indicators
see next post!
Version .2
Here's version .2. The OP will be updated at some point when I have time to rewrite it.
Changes:
1) The % text is now smoothed and anti-aliased.
2) You can draw a circular progress bar by specifying rotateStart and rotateEnd attributes for the bar element. These are in degrees (0-360). The "bar" image will be drawn at the startX, startY point (usually 0,0; omit if you like as this is the default) and then repeatedly rotated and drawn up to the currently drawn battery level. endX and endY are ignored if you use rotation. (The included config.xml file has an example of using this feature.)
3) You can now specify a "step" attribute in the batteryLevels element. This allows you to draw icons for only every nth battery level, say, 0,5,10,15...90,95,100. (the default config.xml file includes this attribute so you can see where it is; it is set to 1, which is the default.)
4) in the bar element, you can specify drawCount and skipCount attributes to toggle drawing the progress bar on and off to make a "dotted progress bar" effect. This is often done for circular battery icons. Basically, specify how many % to draw and then how many % to skip using these attributes. (The included config.xml file has an example of using this feature.)
5) An image called "preview.png" will be created in the output folder with a simple compilation of all of your icons in one image. This is useful for posting for others to see or for you to quickly review all in 1 place.
The standard horizontal bar example included with the app has been renamed to "config-bar.xml", while the default "config.xml" included creates a dotted circular progress bar and includes most of the features described above.
Have fun! See some attached examples. (PLEASE NOTE: I literally threw the examples together in 10 minutes, they are a little sloppy since I didn't take the time to line things up perfectly, you can do better!)
this tool is premium quality!
Since no one really knows about this tool, I have two requests:
1) If you use this for a theme you make available to others here on XDA, if you could include a link to this thread and (very) briefly mention that you used this to generate your icons that would be much appreciated.
2) Maybe a few clicks to "Submit to Portal" (on the top-right) can get this thread on the XDA home page! (I apologize if soliciting this is against forum rules)
3) Share your work here! Use the cool "preview.png" feature to post some examples of what you've created.
Enjoy!
R3D X said:
this tool is premium quality!
Click to expand...
Click to collapse
Thanks, glad it works for you!
jsmith8858 said:
Since no one really knows about this tool, I have two requests:
1) If you use this for a theme you make available to others here on XDA, if you could include a link to this thread and (very) briefly mention that you used this to generate your icons that would be much appreciated.
2) Maybe a few clicks to "Submit to Portal" (on the top-right) can get this thread on the XDA home page! (I apologize if soliciting this is against forum rules)
3) Share your work here! Use the cool "preview.png" feature to post some examples of what you've created.
Enjoy!
Click to expand...
Click to collapse
Ya, this should have been on the homepage of XDA months ago. lol. Thanks for the update. I know I included a link on my first theme to this thread, but forgot about the others. I'll mention you now in every OP. Thanks a million. My themes wouldn't be possible without this. Submitting to portal now!

[Q] Where Is Our Stock Battery Icon?

I'm running stock 4.4 on my Sprint Moto X and I want to edit my status bar icons to align them. But I can't seem to locate the battery icon(s). Experience and common sense tells me the png's should be in SystemUI.apk, but I've cracked it open and I don't see them. Hopefully someone knows something I don't. I thought this would be an easy mod, but...
sasokutenshin said:
I'm running stock 4.4 on my Sprint Moto X and I want to edit my status bar icons to align them. But I can't seem to locate the battery icon(s). Experience and common sense tells me the png's should be in SystemUI.apk, but I've cracked it open and I don't see them. Hopefully someone knows something I don't. I thought this would be an easy mod, but...
Click to expand...
Click to collapse
Battery icons in KK are drawn in java. There are no images used.
Thank you, sir. I didn't know.
sasokutenshin said:
Thank you, sir. I didn't know.
Click to expand...
Click to collapse
what do you mean by align them? although they are drawn in java, they are still called in within the status_bar.xml located in the layout folder.
Code:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" />
mrvirginia said:
what do you mean by align them? although they are drawn in java, they are still called in within the status_bar.xml located in the layout folder.
Code:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" />
Click to expand...
Click to collapse
I don't know how else to explain it. In 4.4, the battery, signal, etc icons aren't aligned. The battery is the most noticeable of these. It sits considerably higher than the signal bars right next to it. Prior to 4.4, when there were still battery images in the SystemUI.apk, I could've simply edited those images, lowering the battery a pixel or two. I appreciate the help with pointing out the appropriate xml. But even if I knew how to change that, I replaced my laptop recently and for some reason I'm having hell getting apktool or any of its variants working correctly. So I can't decompile/recompile currently.
sasokutenshin said:
I don't know how else to explain it. In 4.4, the battery, signal, etc icons aren't aligned. The battery is the most noticeable of these. It sits considerably higher than the signal bars right next to it. Prior to 4.4, when there were still battery images in the SystemUI.apk, I could've simply edited those images, lowering the battery a pixel or two. I appreciate the help with pointing out the appropriate xml. But even if I knew how to change that, I replaced my laptop recently and for some reason I'm having hell getting apktool or any of its variants working correctly. So I can't decompile/recompile currently.
Click to expand...
Click to collapse
use v2.0.0 beta 9. that's what i used.
in the code there, i would start with changing the marginbottom to 0.0dip
I keep getting a style-v17 error and I don't know what it means. Nothing will even decompile. I've searched, but all I've found are maybe two people asking the same question with no answers. I am by no means a "developer". More often than not, I simply crack open an apk with 7zip (or old school style with NinjaMorph if I'm on my phone) and edit png's. I've used apktool a handful of times, but I had no problems getting it working properly on my last laptop. Followed instructions and it worked. No such luck this time.
On a more topic-related note, it turns out it was more about the signal bars sitting too low than the battery sitting too high. I used Zipthemer and fixed the relevant signal bar png's.
sasokutenshin said:
I keep getting a style-v17 error and I don't know what it means. Nothing will even decompile. I've searched, but all I've found are maybe two people asking the same question with no answers. I am by no means a "developer". More often than not, I simply crack open an apk with 7zip (or old school style with NinjaMorph if I'm on my phone) and edit png's. I've used apktool a handful of times, but I had no problems getting it working properly on my last laptop. Followed instructions and it worked. No such luck this time.
On a more topic-related note, it turns out it was more about the signal bars sitting too low than the battery sitting too high. I used Zipthemer and fixed the relevant signal bar png's.
Click to expand...
Click to collapse
you need the newest version of java installed, 7 i believe
Get rid of the battery icon.....there is a wonderful free application called "energy bar" which replaces the battery icon with a very thin line on top of the screen indicating battery charge.
mrvirginia said:
use v2.0.0 beta 9. that's what i used.
in the code there, i would start with changing the marginbottom to 0.0dip
Click to expand...
Click to collapse
Man that v2.0.0 beta 9 did the trick. Craziness. Thanks for the tip.
ghstudio said:
Get rid of the battery icon.....there is a wonderful free application called "energy bar" which replaces the battery icon with a very thin line on top of the screen indicating battery charge.
Click to expand...
Click to collapse
Excellent find. Unfortunately, my brain only thinks in the form of crunching numbers, so I gotta have a battery icon with percentage text.
sasokutenshin said:
Man that v2.0.0 beta 9 did the trick. Craziness. Thanks for the tip.
Click to expand...
Click to collapse
yeah no problem :highfive:

Categories

Resources