PCTechRoss

Battery Percent help

10 posts in this topic

Hi

I'm getting an issue with my system UI. I add the icons and they will show up on the ROM but do not work properly, I then change the XMLs to a file which had Bpercent and then when I check the ROM the icons don't show up at all.

Please help

0

Share this post


Link to post
Share on other sites

did you de-complie the systemUI then add the xml / resources?

then re-compile.

0

Share this post


Link to post
Share on other sites

did you de-complie the systemUI then add the xml / resources?

then re-compile.

no,

all I did was changed the SystemUI.apk to a .zip open up the file folders res, etc.. then copied a another systemui's battery xmls to my SystemUI

0

Share this post


Link to post
Share on other sites

That's the noob way dude, use an apk decompiler so you can actually open all the xmls and view them without seeing lost of jibber jabber :P

Redflake also had a tutorial on adding your own custom battery mods, just go to his profile and look through his threads to find it.

0

Share this post


Link to post
Share on other sites

de-complie the systemUI, use these from my guide ;)

notepad ++ > http://notepad-plus-...nload/v6.3.html

apk manager > http://ubuntuone.com...iGEQawtXvjzLq�� (How To Use)

change the code in

projects / systemUI / res / drawable / stat_sys_battery.xml (use notepad ++)

to

<?xml version="1.0" encoding="utf-8"?>
<level-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="0" />
<item android:drawable="@drawable/stat_sys_battery_1" android:maxLevel="1" />
<item android:drawable="@drawable/stat_sys_battery_2" android:maxLevel="2" />
<item android:drawable="@drawable/stat_sys_battery_3" android:maxLevel="3" />
<item android:drawable="@drawable/stat_sys_battery_4" android:maxLevel="4" />
<item android:drawable="@drawable/stat_sys_battery_5" android:maxLevel="5" />
<item android:drawable="@drawable/stat_sys_battery_6" android:maxLevel="6" />
<item android:drawable="@drawable/stat_sys_battery_7" android:maxLevel="7" />
<item android:drawable="@drawable/stat_sys_battery_8" android:maxLevel="8" />
<item android:drawable="@drawable/stat_sys_battery_9" android:maxLevel="9" />
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="10" />
<item android:drawable="@drawable/stat_sys_battery_11" android:maxLevel="11" />
<item android:drawable="@drawable/stat_sys_battery_12" android:maxLevel="12" />
<item android:drawable="@drawable/stat_sys_battery_13" android:maxLevel="13" />
<item android:drawable="@drawable/stat_sys_battery_14" android:maxLevel="14" />
<item android:drawable="@drawable/stat_sys_battery_15" android:maxLevel="15" />
<item android:drawable="@drawable/stat_sys_battery_16" android:maxLevel="16" />
<item android:drawable="@drawable/stat_sys_battery_17" android:maxLevel="17" />
<item android:drawable="@drawable/stat_sys_battery_18" android:maxLevel="18" />
<item android:drawable="@drawable/stat_sys_battery_19" android:maxLevel="19" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="20" />
<item android:drawable="@drawable/stat_sys_battery_21" android:maxLevel="21" />
<item android:drawable="@drawable/stat_sys_battery_22" android:maxLevel="22" />
<item android:drawable="@drawable/stat_sys_battery_23" android:maxLevel="23" />
<item android:drawable="@drawable/stat_sys_battery_24" android:maxLevel="24" />
<item android:drawable="@drawable/stat_sys_battery_25" android:maxLevel="25" />
<item android:drawable="@drawable/stat_sys_battery_26" android:maxLevel="26" />
<item android:drawable="@drawable/stat_sys_battery_27" android:maxLevel="27" />
<item android:drawable="@drawable/stat_sys_battery_28" android:maxLevel="28" />
<item android:drawable="@drawable/stat_sys_battery_29" android:maxLevel="29" />
<item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="30" />
<item android:drawable="@drawable/stat_sys_battery_31" android:maxLevel="31" />
<item android:drawable="@drawable/stat_sys_battery_32" android:maxLevel="32" />
<item android:drawable="@drawable/stat_sys_battery_33" android:maxLevel="33" />
<item android:drawable="@drawable/stat_sys_battery_34" android:maxLevel="34" />
<item android:drawable="@drawable/stat_sys_battery_35" android:maxLevel="35" />
<item android:drawable="@drawable/stat_sys_battery_36" android:maxLevel="36" />
<item android:drawable="@drawable/stat_sys_battery_37" android:maxLevel="37" />
<item android:drawable="@drawable/stat_sys_battery_38" android:maxLevel="38" />
<item android:drawable="@drawable/stat_sys_battery_39" android:maxLevel="39" />
<item android:drawable="@drawable/stat_sys_battery_40" android:maxLevel="40" />
<item android:drawable="@drawable/stat_sys_battery_41" android:maxLevel="41" />
<item android:drawable="@drawable/stat_sys_battery_42" android:maxLevel="42" />
<item android:drawable="@drawable/stat_sys_battery_43" android:maxLevel="43" />
<item android:drawable="@drawable/stat_sys_battery_44" android:maxLevel="44" />
<item android:drawable="@drawable/stat_sys_battery_45" android:maxLevel="45" />
<item android:drawable="@drawable/stat_sys_battery_46" android:maxLevel="46" />
<item android:drawable="@drawable/stat_sys_battery_47" android:maxLevel="47" />
<item android:drawable="@drawable/stat_sys_battery_48" android:maxLevel="48" />
<item android:drawable="@drawable/stat_sys_battery_49" android:maxLevel="49" />
<item android:drawable="@drawable/stat_sys_battery_50" android:maxLevel="50" />
<item android:drawable="@drawable/stat_sys_battery_51" android:maxLevel="51" />
<item android:drawable="@drawable/stat_sys_battery_52" android:maxLevel="52" />
<item android:drawable="@drawable/stat_sys_battery_53" android:maxLevel="53" />
<item android:drawable="@drawable/stat_sys_battery_54" android:maxLevel="54" />
<item android:drawable="@drawable/stat_sys_battery_55" android:maxLevel="55" />
<item android:drawable="@drawable/stat_sys_battery_56" android:maxLevel="56" />
<item android:drawable="@drawable/stat_sys_battery_57" android:maxLevel="57" />
<item android:drawable="@drawable/stat_sys_battery_58" android:maxLevel="58" />
<item android:drawable="@drawable/stat_sys_battery_59" android:maxLevel="59" />
<item android:drawable="@drawable/stat_sys_battery_60" android:maxLevel="60" />
<item android:drawable="@drawable/stat_sys_battery_61" android:maxLevel="61" />
<item android:drawable="@drawable/stat_sys_battery_62" android:maxLevel="62" />
<item android:drawable="@drawable/stat_sys_battery_63" android:maxLevel="63" />
<item android:drawable="@drawable/stat_sys_battery_64" android:maxLevel="64" />
<item android:drawable="@drawable/stat_sys_battery_65" android:maxLevel="65" />
<item android:drawable="@drawable/stat_sys_battery_66" android:maxLevel="66" />
<item android:drawable="@drawable/stat_sys_battery_67" android:maxLevel="67" />
<item android:drawable="@drawable/stat_sys_battery_68" android:maxLevel="68" />
<item android:drawable="@drawable/stat_sys_battery_69" android:maxLevel="69" />
<item android:drawable="@drawable/stat_sys_battery_70" android:maxLevel="70" />
<item android:drawable="@drawable/stat_sys_battery_71" android:maxLevel="71" />
<item android:drawable="@drawable/stat_sys_battery_72" android:maxLevel="72" />
<item android:drawable="@drawable/stat_sys_battery_73" android:maxLevel="73" />
<item android:drawable="@drawable/stat_sys_battery_74" android:maxLevel="74" />
<item android:drawable="@drawable/stat_sys_battery_75" android:maxLevel="75" />
<item android:drawable="@drawable/stat_sys_battery_76" android:maxLevel="76" />
<item android:drawable="@drawable/stat_sys_battery_77" android:maxLevel="77" />
<item android:drawable="@drawable/stat_sys_battery_78" android:maxLevel="78" />
<item android:drawable="@drawable/stat_sys_battery_79" android:maxLevel="79" />
<item android:drawable="@drawable/stat_sys_battery_80" android:maxLevel="80" />
<item android:drawable="@drawable/stat_sys_battery_81" android:maxLevel="81" />
<item android:drawable="@drawable/stat_sys_battery_82" android:maxLevel="82" />
<item android:drawable="@drawable/stat_sys_battery_83" android:maxLevel="83" />
<item android:drawable="@drawable/stat_sys_battery_84" android:maxLevel="84" />
<item android:drawable="@drawable/stat_sys_battery_85" android:maxLevel="85" />
<item android:drawable="@drawable/stat_sys_battery_86" android:maxLevel="86" />
<item android:drawable="@drawable/stat_sys_battery_87" android:maxLevel="87" />
<item android:drawable="@drawable/stat_sys_battery_88" android:maxLevel="88" />
<item android:drawable="@drawable/stat_sys_battery_89" android:maxLevel="89" />
<item android:drawable="@drawable/stat_sys_battery_90" android:maxLevel="90" />
<item android:drawable="@drawable/stat_sys_battery_91" android:maxLevel="91" />
<item android:drawable="@drawable/stat_sys_battery_92" android:maxLevel="92" />
<item android:drawable="@drawable/stat_sys_battery_93" android:maxLevel="93" />
<item android:drawable="@drawable/stat_sys_battery_94" android:maxLevel="94" />
<item android:drawable="@drawable/stat_sys_battery_95" android:maxLevel="95" />
<item android:drawable="@drawable/stat_sys_battery_96" android:maxLevel="96" />
<item android:drawable="@drawable/stat_sys_battery_97" android:maxLevel="97" />
<item android:drawable="@drawable/stat_sys_battery_98" android:maxLevel="98" />
<item android:drawable="@drawable/stat_sys_battery_99" android:maxLevel="99" />
<item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="100" />
</level-list>[/xml]

save it, then add the 101 battery resources (.png images) to drawable-hdpi

then compile.

1

Share this post


Link to post
Share on other sites

That's the noob way dude, use an apk decompiler so you can actually open all the xmls and view them without seeing lost of jibber jabber :P

Redflake also had a tutorial on adding your own custom battery mods, just go to his profile and look through his threads to find it.

I am a noob haha.

0

Share this post


Link to post
Share on other sites

de-complie the systemUI. use these from one of my guides ;)

notepad ++ > http://notepad-plus-...nload/v6.3.html

apk manager > http://ubuntuone.com...iGEQawtXvjzLq�� (How To Use)

change the code in (use notepad ++)

projects / systemUI / res / drawable / stat_sys_battery.xml

to

<?xml version="1.0" encoding="utf-8"?>
<level-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/stat_sys_battery_circle_0" android:maxLevel="0" />
<item android:drawable="@drawable/stat_sys_battery_circle_1" android:maxLevel="1" />
<item android:drawable="@drawable/stat_sys_battery_circle_2" android:maxLevel="2" />
<item android:drawable="@drawable/stat_sys_battery_circle_3" android:maxLevel="3" />
<item android:drawable="@drawable/stat_sys_battery_circle_4" android:maxLevel="4" />
<item android:drawable="@drawable/stat_sys_battery_circle_5" android:maxLevel="5" />
<item android:drawable="@drawable/stat_sys_battery_circle_6" android:maxLevel="6" />
<item android:drawable="@drawable/stat_sys_battery_circle_7" android:maxLevel="7" />
<item android:drawable="@drawable/stat_sys_battery_circle_8" android:maxLevel="8" />
<item android:drawable="@drawable/stat_sys_battery_circle_9" android:maxLevel="9" />
<item android:drawable="@drawable/stat_sys_battery_circle_10" android:maxLevel="10" />
<item android:drawable="@drawable/stat_sys_battery_circle_11" android:maxLevel="11" />
<item android:drawable="@drawable/stat_sys_battery_circle_12" android:maxLevel="12" />
<item android:drawable="@drawable/stat_sys_battery_circle_13" android:maxLevel="13" />
<item android:drawable="@drawable/stat_sys_battery_circle_14" android:maxLevel="14" />
<item android:drawable="@drawable/stat_sys_battery_circle_15" android:maxLevel="15" />
<item android:drawable="@drawable/stat_sys_battery_circle_16" android:maxLevel="16" />
<item android:drawable="@drawable/stat_sys_battery_circle_17" android:maxLevel="17" />
<item android:drawable="@drawable/stat_sys_battery_circle_18" android:maxLevel="18" />
<item android:drawable="@drawable/stat_sys_battery_circle_19" android:maxLevel="19" />
<item android:drawable="@drawable/stat_sys_battery_circle_20" android:maxLevel="20" />
<item android:drawable="@drawable/stat_sys_battery_circle_21" android:maxLevel="21" />
<item android:drawable="@drawable/stat_sys_battery_circle_22" android:maxLevel="22" />
<item android:drawable="@drawable/stat_sys_battery_circle_23" android:maxLevel="23" />
<item android:drawable="@drawable/stat_sys_battery_circle_24" android:maxLevel="24" />
<item android:drawable="@drawable/stat_sys_battery_circle_25" android:maxLevel="25" />
<item android:drawable="@drawable/stat_sys_battery_circle_26" android:maxLevel="26" />
<item android:drawable="@drawable/stat_sys_battery_circle_27" android:maxLevel="27" />
<item android:drawable="@drawable/stat_sys_battery_circle_28" android:maxLevel="28" />
<item android:drawable="@drawable/stat_sys_battery_circle_29" android:maxLevel="29" />
<item android:drawable="@drawable/stat_sys_battery_circle_30" android:maxLevel="30" />
<item android:drawable="@drawable/stat_sys_battery_circle_31" android:maxLevel="31" />
<item android:drawable="@drawable/stat_sys_battery_circle_32" android:maxLevel="32" />
<item android:drawable="@drawable/stat_sys_battery_circle_33" android:maxLevel="33" />
<item android:drawable="@drawable/stat_sys_battery_circle_34" android:maxLevel="34" />
<item android:drawable="@drawable/stat_sys_battery_circle_35" android:maxLevel="35" />
<item android:drawable="@drawable/stat_sys_battery_circle_36" android:maxLevel="36" />
<item android:drawable="@drawable/stat_sys_battery_circle_37" android:maxLevel="37" />
<item android:drawable="@drawable/stat_sys_battery_circle_38" android:maxLevel="38" />
<item android:drawable="@drawable/stat_sys_battery_circle_39" android:maxLevel="39" />
<item android:drawable="@drawable/stat_sys_battery_circle_40" android:maxLevel="40" />
<item android:drawable="@drawable/stat_sys_battery_circle_41" android:maxLevel="41" />
<item android:drawable="@drawable/stat_sys_battery_circle_42" android:maxLevel="42" />
<item android:drawable="@drawable/stat_sys_battery_circle_43" android:maxLevel="43" />
<item android:drawable="@drawable/stat_sys_battery_circle_44" android:maxLevel="44" />
<item android:drawable="@drawable/stat_sys_battery_circle_45" android:maxLevel="45" />
<item android:drawable="@drawable/stat_sys_battery_circle_46" android:maxLevel="46" />
<item android:drawable="@drawable/stat_sys_battery_circle_47" android:maxLevel="47" />
<item android:drawable="@drawable/stat_sys_battery_circle_48" android:maxLevel="48" />
<item android:drawable="@drawable/stat_sys_battery_circle_49" android:maxLevel="49" />
<item android:drawable="@drawable/stat_sys_battery_circle_50" android:maxLevel="50" />
<item android:drawable="@drawable/stat_sys_battery_circle_51" android:maxLevel="51" />
<item android:drawable="@drawable/stat_sys_battery_circle_52" android:maxLevel="52" />
<item android:drawable="@drawable/stat_sys_battery_circle_53" android:maxLevel="53" />
<item android:drawable="@drawable/stat_sys_battery_circle_54" android:maxLevel="54" />
<item android:drawable="@drawable/stat_sys_battery_circle_55" android:maxLevel="55" />
<item android:drawable="@drawable/stat_sys_battery_circle_56" android:maxLevel="56" />
<item android:drawable="@drawable/stat_sys_battery_circle_57" android:maxLevel="57" />
<item android:drawable="@drawable/stat_sys_battery_circle_58" android:maxLevel="58" />
<item android:drawable="@drawable/stat_sys_battery_circle_59" android:maxLevel="59" />
<item android:drawable="@drawable/stat_sys_battery_circle_60" android:maxLevel="60" />
<item android:drawable="@drawable/stat_sys_battery_circle_61" android:maxLevel="61" />
<item android:drawable="@drawable/stat_sys_battery_circle_62" android:maxLevel="62" />
<item android:drawable="@drawable/stat_sys_battery_circle_63" android:maxLevel="63" />
<item android:drawable="@drawable/stat_sys_battery_circle_64" android:maxLevel="64" />
<item android:drawable="@drawable/stat_sys_battery_circle_65" android:maxLevel="65" />
<item android:drawable="@drawable/stat_sys_battery_circle_66" android:maxLevel="66" />
<item android:drawable="@drawable/stat_sys_battery_circle_67" android:maxLevel="67" />
<item android:drawable="@drawable/stat_sys_battery_circle_68" android:maxLevel="68" />
<item android:drawable="@drawable/stat_sys_battery_circle_69" android:maxLevel="69" />
<item android:drawable="@drawable/stat_sys_battery_circle_70" android:maxLevel="70" />
<item android:drawable="@drawable/stat_sys_battery_circle_71" android:maxLevel="71" />
<item android:drawable="@drawable/stat_sys_battery_circle_72" android:maxLevel="72" />
<item android:drawable="@drawable/stat_sys_battery_circle_73" android:maxLevel="73" />
<item android:drawable="@drawable/stat_sys_battery_circle_74" android:maxLevel="74" />
<item android:drawable="@drawable/stat_sys_battery_circle_75" android:maxLevel="75" />
<item android:drawable="@drawable/stat_sys_battery_circle_76" android:maxLevel="76" />
<item android:drawable="@drawable/stat_sys_battery_circle_77" android:maxLevel="77" />
<item android:drawable="@drawable/stat_sys_battery_circle_78" android:maxLevel="78" />
<item android:drawable="@drawable/stat_sys_battery_circle_79" android:maxLevel="79" />
<item android:drawable="@drawable/stat_sys_battery_circle_80" android:maxLevel="80" />
<item android:drawable="@drawable/stat_sys_battery_circle_81" android:maxLevel="81" />
<item android:drawable="@drawable/stat_sys_battery_circle_82" android:maxLevel="82" />
<item android:drawable="@drawable/stat_sys_battery_circle_83" android:maxLevel="83" />
<item android:drawable="@drawable/stat_sys_battery_circle_84" android:maxLevel="84" />
<item android:drawable="@drawable/stat_sys_battery_circle_85" android:maxLevel="85" />
<item android:drawable="@drawable/stat_sys_battery_circle_86" android:maxLevel="86" />
<item android:drawable="@drawable/stat_sys_battery_circle_87" android:maxLevel="87" />
<item android:drawable="@drawable/stat_sys_battery_circle_88" android:maxLevel="88" />
<item android:drawable="@drawable/stat_sys_battery_circle_89" android:maxLevel="89" />
<item android:drawable="@drawable/stat_sys_battery_circle_90" android:maxLevel="90" />
<item android:drawable="@drawable/stat_sys_battery_circle_91" android:maxLevel="91" />
<item android:drawable="@drawable/stat_sys_battery_circle_92" android:maxLevel="92" />
<item android:drawable="@drawable/stat_sys_battery_circle_93" android:maxLevel="93" />
<item android:drawable="@drawable/stat_sys_battery_circle_94" android:maxLevel="94" />
<item android:drawable="@drawable/stat_sys_battery_circle_95" android:maxLevel="95" />
<item android:drawable="@drawable/stat_sys_battery_circle_96" android:maxLevel="96" />
<item android:drawable="@drawable/stat_sys_battery_circle_97" android:maxLevel="97" />
<item android:drawable="@drawable/stat_sys_battery_circle_98" android:maxLevel="98" />
<item android:drawable="@drawable/stat_sys_battery_circle_99" android:maxLevel="99" />
<item android:drawable="@drawable/stat_sys_battery_circle_100" android:maxLevel="100" />
</level-list>[/xml]

save it, then add the 101 battery resources (.png images) to drawable-hdpi

then compile.

Thanks, i'll have a go in a bit.

0

Share this post


Link to post
Share on other sites

Thanks, i'll have a go in a bit.

make sure you use the edited code as the one you quoted above was wrong and i have since corrected my mistake.

also make sure the resources you add are named "stat_sys_battery_" followed by its number

as this is what the code in the xml expects.

0

Share this post


Link to post
Share on other sites

make sure you use the edited code as the one you quoted above was wrong and i have since corrected my mistake.

also make sure the resources you add are named "stat_sys_battery_" followed by its number

as this is what the code in the xml expects.

Edit. Nevermind

Edited by PCTechRoss
0

Share this post


Link to post
Share on other sites

de-complie the systemUI, use these from my guide ;)

notepad ++ > http://notepad-plus-...nload/v6.3.html

apk manager > http://ubuntuone.com...iGEQawtXvjzLq�� (How To Use)

change the code in

projects / systemUI / res / drawable / stat_sys_battery.xml (use notepad ++)

to

save it, then add the 101 battery resources (.png images) to drawable-hdpi

then compile.

Do you have the charging code too?

Edit nevermine

Edited by PCTechRoss
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.