• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[HOW TO][Special KK]Change The Battery Icon On KitKat Rom! [27.10.14][NEED TESTERS!]

Search This thread

Erhany

Senior Member
Feb 9, 2012
455
1,028
com/erhany
erhany.weebly.com
Hello guys..
As you know, changing the battery icon on a KitKat rom wasn't easy before..
Today I'm gonna guide you about start using your own icons back on KK.

Code:
--
APKTOOL
Decompiled SystemUI.apk
--

*Download the pack. Package includes ;
KitkatBattery_Erhany_apktool1 and KitkatBattery_Erhany_apktool2 folders. I decompiled java codes with both apktool versions for you to try one by one due to smaling problems.


**If you have doubts with my guide, check @Ticklefish 's SAME GUIDE FROM HERE!!

* Copy stat_sys_battery.xml and stat_sys_battery_charge.xml files from downloaded pack and paste into your decompiled SystemUI/drawable folder.

* go to res/values/public.xml and add following lines:

PHP:
<public type="drawable" name="stat_sys_battery" id="0xYOURCODE1" />
<public type="drawable" name="stat_sys_battery_charge" id="0xYOURCODE2" />
!! You will do it manually so find your last drawable hex code and continue to it.. Then save & close..

* copy 16 images into drawable/?dpi folder.. (your device resolution)
!No need to add image codes into public.xml .. Apktool will do it otomatically..

* copy erhany/ folder into decompiled .dex /com/ folder.. (long path: /com/erhany/KitKatBattery.smali & KitKatBattery$1.smali)
and open KitKatBattery$1.smali file.
find .line 33 and .line 36 and change const v3, 0X.. with your public codes you created! Then save it.

* go back to res/layout/status_bar.xml and open it. find your " @id/battery " code line and change it with new following code:

PHP:
<com.erhany.KitKatBattery android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" />

An Example from Stock!!;
from this:
PHP:
<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" />

to this:
PHP:
<com.erhany.KitKatBattery android:gravity="center" android:id="@id/battery" android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
Warning! The magic is giving android:visibility="gone" to your original code to hide ex..
Also this will give you GravityBox (KK) support too !!

Save and close.

* All done. Recompile apk, test it and reply to topic for several devices!

---------
TESTED DEVICE RESULTS:
GENERAL MOBILE DISCOVERY MTK6589 AOSP KK 4.4.2
%100 works.. 16 icons √ 100+100 icons √ animated charging xml √




Note: If success I want you try with "your" 100 icons of stat_sys_battery_charge.xml file also with an animated one too..
Try and reply !

---No noob questions please---
---Try it with your own risk. Im not responsible for any damages---


Happy days!
 

Attachments

  • KitKatBattery_Erhany.rar
    206.6 KB · Views: 10,969
Last edited:

Erhany

Senior Member
Feb 9, 2012
455
1,028
com/erhany
erhany.weebly.com
Some Example XML Files..

Animated stat_sys_battery_charge.xml code to try:
PHP:
<?xml version="1.0" encoding="utf-8"?>
<level-list
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:maxLevel="4">
        <animation-list android:oneshot="false"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim0" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim15" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim28" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
        </animation-list>
    </item>
    <item android:maxLevel="15">
        <animation-list android:oneshot="false"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim15" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim28" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
        </animation-list>
    </item>
    <item android:maxLevel="35">
        <animation-list android:oneshot="false"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim28" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
        </animation-list>
    </item>
    <item android:maxLevel="49">
        <animation-list android:oneshot="false"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
        </animation-list>
    </item>
    <item android:maxLevel="60">
        <animation-list android:oneshot="false"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
        </animation-list>
    </item>
    <item android:maxLevel="75">
        <animation-list android:oneshot="false"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
        </animation-list>
    </item>
    <item android:maxLevel="90">
        <animation-list android:oneshot="false"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
            <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
        </animation-list>
    </item>
    <item android:drawable="@drawable/stat_sys_battery_charge_anim100" android:maxLevel="100" />
</level-list>
---------------------------------------------------
Also, if you have 100+100png icons:

stat_sys_battery.xml
PHP:
<?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>

stat_sys_battery_charge.xml
PHP:
<?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_charge_anim0" android:maxLevel="0" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim1" android:maxLevel="1" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim2" android:maxLevel="2" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim3" android:maxLevel="3" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim4" android:maxLevel="4" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:maxLevel="5" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim6" android:maxLevel="6" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim7" android:maxLevel="7" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim8" android:maxLevel="8" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim9" android:maxLevel="9" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim10" android:maxLevel="10" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim11" android:maxLevel="11" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim12" android:maxLevel="12" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim13" android:maxLevel="13" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim14" android:maxLevel="14" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim15" android:maxLevel="15" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim16" android:maxLevel="16" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim17" android:maxLevel="17" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim18" android:maxLevel="18" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim19" android:maxLevel="19" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim20" android:maxLevel="20" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim21" android:maxLevel="21" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim22" android:maxLevel="22" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim23" android:maxLevel="23" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim24" android:maxLevel="24" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim25" android:maxLevel="25" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim26" android:maxLevel="26" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim27" android:maxLevel="27" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim28" android:maxLevel="28" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim29" android:maxLevel="29" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim30" android:maxLevel="30" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim31" android:maxLevel="31" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim32" android:maxLevel="32" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim33" android:maxLevel="33" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim34" android:maxLevel="34" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim35" android:maxLevel="35" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim36" android:maxLevel="36" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim37" android:maxLevel="37" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim38" android:maxLevel="38" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim39" android:maxLevel="39" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim40" android:maxLevel="40" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim41" android:maxLevel="41" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim42" android:maxLevel="42" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim43" android:maxLevel="43" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim44" android:maxLevel="44" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim45" android:maxLevel="45" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim46" android:maxLevel="46" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim47" android:maxLevel="47" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim48" android:maxLevel="48" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim49" android:maxLevel="49" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim50" android:maxLevel="50" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim51" android:maxLevel="51" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim52" android:maxLevel="52" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim53" android:maxLevel="53" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim54" android:maxLevel="54" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim55" android:maxLevel="55" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim56" android:maxLevel="56" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim57" android:maxLevel="57" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim58" android:maxLevel="58" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim59" android:maxLevel="59" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim60" android:maxLevel="60" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim61" android:maxLevel="61" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim62" android:maxLevel="62" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim63" android:maxLevel="63" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim64" android:maxLevel="64" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim65" android:maxLevel="65" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim66" android:maxLevel="66" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim67" android:maxLevel="67" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim68" android:maxLevel="68" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim69" android:maxLevel="69" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim70" android:maxLevel="70" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim71" android:maxLevel="71" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim72" android:maxLevel="72" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim73" android:maxLevel="73" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim74" android:maxLevel="74" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim75" android:maxLevel="75" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim76" android:maxLevel="76" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim77" android:maxLevel="77" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim78" android:maxLevel="78" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim79" android:maxLevel="79" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim80" android:maxLevel="80" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim81" android:maxLevel="81" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim82" android:maxLevel="82" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim83" android:maxLevel="83" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim84" android:maxLevel="84" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim85" android:maxLevel="85" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim86" android:maxLevel="86" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim87" android:maxLevel="87" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim88" android:maxLevel="88" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim89" android:maxLevel="89" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim90" android:maxLevel="90" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim91" android:maxLevel="91" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim92" android:maxLevel="92" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim93" android:maxLevel="93" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim94" android:maxLevel="94" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim95" android:maxLevel="95" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim96" android:maxLevel="96" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim97" android:maxLevel="97" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim98" android:maxLevel="98" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim99" android:maxLevel="99" />
    <item android:drawable="@drawable/stat_sys_battery_charge_anim100" android:maxLevel="100" />
</level-list>

try them too! Or any other xml file for charging..
 
Last edited:

Ticklefish

Recognized Themer
Oct 27, 2011
6,750
8,555
Hampshire, UK
You, sir, are an absolute genius!

KitKat has been crying out for this mod since it was released. And Lollipop will need this too.

Very good work, indeed!


--------------------------------------
Sent from my iPad (yes, really)
----------------------------------
 

Erhany

Senior Member
Feb 9, 2012
455
1,028
com/erhany
erhany.weebly.com
You, sir, are an absolute genius!

KitKat has been crying out for this mod since it was released. And Lollipop will need this too.

Very good work, indeed!


--------------------------------------
Sent from my iPad (yes, really)
----------------------------------

Thank you so much Ticklefish.. Still waiting for your tests too.. After all is fine with tested device, I created topic. Hopefully it will work for other devices too..
 

Ticklefish

Recognized Themer
Oct 27, 2011
6,750
8,555
Hampshire, UK
Thank you so much Ticklefish.. Still waiting for your tests too.. After all is fine with tested device, I created topic. Hopefully it will work for other devices too..


I'll let you know tomorrow. Oh, and I'll mention this mod on my KK Xperia battery icon thread. Right now, I need my sleep! Lol


--------------------------------------
Sent from my iPad (yes, really)
----------------------------------
 

WhiteNeo

Senior Member
Feb 13, 2013
2,449
4,097
This is a really awesome news! :)
Any chance you could make it compatible with OmniRom battery icon settings?
I'd love to replace the battery icon, but still allow users to choose the KitKat circle battery from settings if they want to. :)

Guess you'd have to mess around with the BatteryMeterView in SystemUI. :D

Anyways, I'm really happy to finally be able to change the battery icon! Great work! :good:
 

Ticklefish

Recognized Themer
Oct 27, 2011
6,750
8,555
Hampshire, UK
This is a really awesome news! :)
Any chance you could make it compatible with OmniRom battery icon settings?
I'd love to replace the battery icon, but still allow users to choose the KitKat circle battery from settings if they want to. :)

Guess you'd have to mess around with the BatteryMeterView in SystemUI. :D

Anyways, I'm really happy to finally be able to change the battery icon! Great work! :good:
This might be pretty simple to do in just xml. Depends what your status_bar.xml looks like..

-----------------------------------
Sent From Tapatalk
--------------------------------
 

Erhany

Senior Member
Feb 9, 2012
455
1,028
com/erhany
erhany.weebly.com
This is a really awesome news! :)
Any chance you could make it compatible with OmniRom battery icon settings?
I'd love to replace the battery icon, but still allow users to choose the KitKat circle battery from settings if they want to. :)

Guess you'd have to mess around with the BatteryMeterView in SystemUI. :D

Anyways, I'm really happy to finally be able to change the battery icon! Great work! :good:

Thank you, try it and reply the topic again please..
 
  • Like
Reactions: Orochixxx

WhiteNeo

Senior Member
Feb 13, 2013
2,449
4,097
Thank you, try it and reply the topic again please..

Force close here. :(

Code:
E/AndroidRuntime( 2642): FATAL EXCEPTION: main
E/AndroidRuntime( 2642): Process: com.android.systemui, PID: 2642
E/AndroidRuntime( 2642): java.lang.ClassCastException: com.erhany.KitKatBattery cannot be cast to com.android.systemui.BatteryMeterView
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(PhoneStatusBar.java:896)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.addStatusBarWindow(PhoneStatusBar.java:2793)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.createAndAddWindows(PhoneStatusBar.java:2767)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.BaseStatusBar.start(BaseStatusBar.java:309)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java:542)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.SystemBars.createStatusBarFromConfig(SystemBars.java:106)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.SystemBars.onNoService(SystemBars.java:58)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.ServiceMonitor.startService(ServiceMonitor.java:228)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.ServiceMonitor.access$000(ServiceMonitor.java:49)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.ServiceMonitor$1.handleMessage(ServiceMonitor.java:73)
E/AndroidRuntime( 2642):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2642):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 2642):        at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 2642):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2642):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 2642):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
W/ActivityManager(  842): Process com.android.systemui has crashed too many times: killing!

I've attached my unmodified and modified SystemUI, so you can have a look at those if you want. :)
 

Attachments

  • SystemUI.apk
    2 MB · Views: 1,146
  • SystemUI-unmodified.apk
    1.9 MB · Views: 570

Erhany

Senior Member
Feb 9, 2012
455
1,028
com/erhany
erhany.weebly.com
Force close here. :(

I've attached my unmodified and modified SystemUI, so you can have a look at those if you want. :)

Please add your framework files too, 1 and 2.. I will try to do it for you to original file

or first please try that 2 things;

<com.erhany.KitKatBattery systemui:batteryView="statusbar" android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="fill_parent" />

save and compile. if still error try this :

<com.android.systemui.BatteryMeterView android:visibility="gone" android:id="@id/battery" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" systemui:batteryView="statusbar" />
<com.erhany.KitKatBattery android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" />

save and compile.. if this works, you will just need to edit this xml.. First lets be sure that we have icons working
 
Last edited:

WhiteNeo

Senior Member
Feb 13, 2013
2,449
4,097
Please add your framework files too, 1 and 2.. I will try to do it for you to original file

or first please try that 2 things;



save and compile. if still error try this :



save and compile.. if this works, you will just need to edit this xml.. First lets be sure that we have icons working

I've added my framework to my original comment. :)
Will try the lines you suggested tomorrow, as I'm no more at my computer right now :)
 
  • Like
Reactions: Erhany

Ticklefish

Recognized Themer
Oct 27, 2011
6,750
8,555
Hampshire, UK
Force close here. :(

Code:
E/AndroidRuntime( 2642): FATAL EXCEPTION: main
E/AndroidRuntime( 2642): Process: com.android.systemui, PID: 2642
E/AndroidRuntime( 2642): java.lang.ClassCastException: com.erhany.KitKatBattery cannot be cast to com.android.systemui.BatteryMeterView
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(PhoneStatusBar.java:896)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.addStatusBarWindow(PhoneStatusBar.java:2793)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.createAndAddWindows(PhoneStatusBar.java:2767)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.BaseStatusBar.start(BaseStatusBar.java:309)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java:542)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.SystemBars.createStatusBarFromConfig(SystemBars.java:106)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.SystemBars.onNoService(SystemBars.java:58)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.ServiceMonitor.startService(ServiceMonitor.java:228)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.ServiceMonitor.access$000(ServiceMonitor.java:49)
E/AndroidRuntime( 2642):        at com.android.systemui.statusbar.ServiceMonitor$1.handleMessage(ServiceMonitor.java:73)
E/AndroidRuntime( 2642):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2642):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 2642):        at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 2642):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2642):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 2642):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
W/ActivityManager(  842): Process com.android.systemui has crashed too many times: killing!

I've attached my unmodified and modified SystemUI, so you can have a look at those if you want. :)


Please add your framework files too, 1 and 2.. I will try to do it for you to original file

or first please try that 2 things;



save and compile. if still error try this :



save and compile.. if this works, you will just need to edit this xml.. First lets be sure that we have icons working

That's kinda what I was going to suggest.

I don't have any experience with OmniRom but I remember that CyanogenMod has a similar-sounding setup. That has different battery styles you can choose between and they are just a separate line of xml for each style.

You should be able to use this mod to replace one of those styles with a themeable icon..

-------------------------------
Sent Via Tapatalk
-----------------------------
 

WhiteNeo

Senior Member
Feb 13, 2013
2,449
4,097
Alright. I fixed the force close by replacing all "Lcom/android/systemui/BatteryMeterView" in PhoneStatusBar.xml with "Lcom/erhany/KitKatBattery"

Problem is, the icon shows always - even if battery icon is disabled in settings.
I think you'd have to adapt the "updateSettings" method in BatteryMeterView for your KitKatBattery, so it sets the visibility according to the settings.

Below is the java source of said method.
I guess you'd only have to do very few modifications. :)

Code:
    public void updateSettings(){
        int batteryStyle = Settings.System.getIntForUser(getContext().getContentResolver(),
                                Settings.System.STATUS_BAR_BATTERY_STYLE, 0
                                , UserHandle.USER_CURRENT);

        mShowPercent = batteryStyle == 1;
        boolean show = (batteryStyle == 0 || batteryStyle == 2 || mShowPercent
            || (mBatteryView.equals(QuickSettings) && batteryStyle == 6));

        setVisibility(show ? View.VISIBLE : View.GONE);
        postInvalidate();
    }

EDIT: Just tried copying the method's smali stuff over. No success.
It seems that BatteryMeterView has some super class that controls the visibility parameters.
Most likely it's a little more complicated than I thought.. :/
 
Last edited:
  • Like
Reactions: Erhany

Orochixxx

Senior Member
Jul 25, 2011
600
1,249
39
KAHRAMANMARAŞ (46)
LoWRBG.png


New battery icons By me :p
 
  • Like
Reactions: Ticklefish

Ar3Z

New member
Nov 4, 2014
2
1
Indonesia
Hi sir, i had a problem when recompile it with apktool, :confused:
can you help me ?
here is the error


Code:
C:\Users\Anonym\apktool>apktool b systemuicopy
I: Using Apktool 2.0.0-Beta8 on systemuicopy
I: Checking whether sources has changed...
I: Smaling...
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[26,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[27,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[45,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[46,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[45,15] mismatched input '"co
ntext"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: com/erhany/KitKatBattery$1.smali
        at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
        at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:337)
        at brut.androlib.Androlib.buildSources(Androlib.java:298)
        at brut.androlib.Androlib.build(Androlib.java:284)
        at brut.androlib.Androlib.build(Androlib.java:258)
        at brut.apktool.Main.cmdBuild(Main.java:236)
        at brut.apktool.Main.main(Main.java:88)

My device is huawei, with qualcom chipset, & KitKat 4.4.2
TFA :victory:
 

Ticklefish

Recognized Themer
Oct 27, 2011
6,750
8,555
Hampshire, UK
Hi sir, i had a problem when recompile it with apktool, :confused:
can you help me ?
here is the error


Code:
C:\Users\Anonym\apktool>apktool b systemuicopy
I: Using Apktool 2.0.0-Beta8 on systemuicopy
I: Checking whether sources has changed...
I: Smaling...
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[26,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[27,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[45,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[46,4] Error for input '.para
meter': Invalid directive
systemuicopy\smali\com\erhany\KitKatBattery$1.smali[45,15] mismatched input '"co
ntext"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: com/erhany/KitKatBattery$1.smali
        at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)
        at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
        at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:337)
        at brut.androlib.Androlib.buildSources(Androlib.java:298)
        at brut.androlib.Androlib.build(Androlib.java:284)
        at brut.androlib.Androlib.build(Androlib.java:258)
        at brut.apktool.Main.cmdBuild(Main.java:236)
        at brut.apktool.Main.main(Main.java:88)

My device is huawei, with qualcom chipset, & KitKat 4.4.2
TFA :victory:

Use apktool 1.5.2 for this smali. If you're using apktool 2, you need to use smali files that have been made with apktool 2 as well...
 
  • Like
Reactions: Ar3Z

SidEwigk

Senior Member
Dec 25, 2007
56
5
Hi,

I've found your manualy and like it^^
But i have the Problem to find the destination Folder for the Battery Images. Maybe you can help me?
I have CM11 Snapshot last Edition for HTC One (GSM)
I attached the Orignia SystemUI.apk
Thanks for your try to help :d
Hm, it seems that i not so confirm like other ones in using your manually.
I decomplile my SystemUI.apk with the ThcckleMyAndroid tool.
I dont found the Folder that you discriped in
* copy erhany/ folder into decompiled .dex /com/ folder.. (long path: /com/erhany/KitKatBattery.smali & KitKatBattery$1.smali)
and open KitKatBattery$1.smali file.
....
Maybe you can help me here too? ;)
 

Attachments

  • SystemUI.apk
    2.3 MB · Views: 57
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    Hello guys..
    As you know, changing the battery icon on a KitKat rom wasn't easy before..
    Today I'm gonna guide you about start using your own icons back on KK.

    Code:
    --
    APKTOOL
    Decompiled SystemUI.apk
    --

    *Download the pack. Package includes ;
    KitkatBattery_Erhany_apktool1 and KitkatBattery_Erhany_apktool2 folders. I decompiled java codes with both apktool versions for you to try one by one due to smaling problems.


    **If you have doubts with my guide, check @Ticklefish 's SAME GUIDE FROM HERE!!

    * Copy stat_sys_battery.xml and stat_sys_battery_charge.xml files from downloaded pack and paste into your decompiled SystemUI/drawable folder.

    * go to res/values/public.xml and add following lines:

    PHP:
    <public type="drawable" name="stat_sys_battery" id="0xYOURCODE1" />
    <public type="drawable" name="stat_sys_battery_charge" id="0xYOURCODE2" />
    !! You will do it manually so find your last drawable hex code and continue to it.. Then save & close..

    * copy 16 images into drawable/?dpi folder.. (your device resolution)
    !No need to add image codes into public.xml .. Apktool will do it otomatically..

    * copy erhany/ folder into decompiled .dex /com/ folder.. (long path: /com/erhany/KitKatBattery.smali & KitKatBattery$1.smali)
    and open KitKatBattery$1.smali file.
    find .line 33 and .line 36 and change const v3, 0X.. with your public codes you created! Then save it.

    * go back to res/layout/status_bar.xml and open it. find your " @id/battery " code line and change it with new following code:

    PHP:
    <com.erhany.KitKatBattery android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" />

    An Example from Stock!!;
    from this:
    PHP:
    <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" />

    to this:
    PHP:
    <com.erhany.KitKatBattery android:gravity="center" android:id="@id/battery" android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
    Warning! The magic is giving android:visibility="gone" to your original code to hide ex..
    Also this will give you GravityBox (KK) support too !!

    Save and close.

    * All done. Recompile apk, test it and reply to topic for several devices!

    ---------
    TESTED DEVICE RESULTS:
    GENERAL MOBILE DISCOVERY MTK6589 AOSP KK 4.4.2
    %100 works.. 16 icons √ 100+100 icons √ animated charging xml √




    Note: If success I want you try with "your" 100 icons of stat_sys_battery_charge.xml file also with an animated one too..
    Try and reply !

    ---No noob questions please---
    ---Try it with your own risk. Im not responsible for any damages---


    Happy days!
    12
    I think some people are getting a bit confused about how to do this mod. Which is a shame as having an accurate battery icon is such a useful thing to have.

    I've found myself with a bit of free time so I thought I'd do this again and, with @Erhany's permission, I'd provide a little guide showing what I did.

    So here's how I used this mod on my phone, running Android 4.4.4:

    1. The first thing I did was decompile my SystemUI.apk. There are lots of different ways to do this and lots of different ways, but I always use Tickle My Android for all my decompiling and recompiling.
    2. While my apk was decompiling, I downloaded KitKatBattery_Erhany.rar from the OP and extracted it to a spare directory. This file contains two sets of files: "KitkatBattery_Erhany_apktool1" and "KitkatBattery_Erhany_apktool2". I used apktool 2 RC4 to decompile my apk, so I'll be using the files from "KitkatBattery_Erhany_apktool2".
    3. Once my SystemUI.apk was decompiled, I copied the KitkatBattery_Erhany_apktool2\res\ folder to it. This copied all the relevant image files and XML files that the new battery icon would be using into my decompiled apk.
    4. The OP then says to edit public.xml to put some new hex references in. I actually never edit public.xml. Instead, my next step is to recompile SystemUI.apk...and then decompile it again.
      This forces public.xml to update itself with references for all the new files. This is a lot easier than editing public.xml myself!
    5. Now the apk is decompiled for the second time, I can copy the KitkatBattery_Erhany_apktool2\smali\ folder into it.
    6. The next stage is to edit "KitKatBattery$1.smali", which is found in "SystemUI.apk\smali\com\erhany\". There are two lines in there which need changing..
    7. The first line says:
      Code:
      const v3, [COLOR="Red"]0xstat_sys_battery_charge!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11[/COLOR]
      I looked in "SystemUI.apk\res\values\public.xml" and found this line:
      Code:
      <public type="drawable" name="stat_sys_battery_charge" id="[color="red"]0x7f0201b6[/color]" />
      Now all I need to do is swap the parts in red to make the smali look like:
      Code:
      const v3, [COLOR="Red"]0x7f0201b6[/COLOR]
    8. The second line of smali I need to change says:
      Code:
      const v3, [COLOR="red"]0xstat_sys_battery !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/COLOR]
      My public.xml has this line in it now:
      Code:
      <public type="drawable" name="stat_sys_battery" id="[COLOR="Red"]0x7f0201b5[/COLOR]" />
      So I just need to change this smali line to:
      Code:
      const v3, 0x7f0201b5
    9. My new battery icon is now ready to display on my status bar, so the next step is to edit my "SystemUI.apk\res\layout\status_bar.xml".
      This is a long file and, unless you're familiar with Android XML, it can look very confusing. But I only want to change one small part of it.
      I want to change this line here:
      Code:
      <com.android.systemui.BatteryMeterView [COLOR="red"]android:id="@id/battery"[/COLOR] android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" />
      This is the line that displays my battery icon. All I have to do is replace it with this line:
      Code:
      <com.erhany.KitKatBattery android:gravity="center" [COLOR="red"]android:id="@id/battery"[/COLOR] android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
    10. Now I just need to save all the open smali and XML files, recompile and flash my modded SystemUI.apk back to my phone and...that's it!

    Sounds complicated, I agree. But, really, it isn't.

    Just follow the steps, take your time, and you too will have a new battery icon on your phone! ;)

    Any problems, just let us know!
    10
    Some Example XML Files..

    Animated stat_sys_battery_charge.xml code to try:
    PHP:
    <?xml version="1.0" encoding="utf-8"?>
    <level-list
      xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:maxLevel="4">
            <animation-list android:oneshot="false"
              xmlns:android="http://schemas.android.com/apk/res/android">
                <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim0" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim15" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim28" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
            </animation-list>
        </item>
        <item android:maxLevel="15">
            <animation-list android:oneshot="false"
              xmlns:android="http://schemas.android.com/apk/res/android">
                <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim15" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim28" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
            </animation-list>
        </item>
        <item android:maxLevel="35">
            <animation-list android:oneshot="false"
              xmlns:android="http://schemas.android.com/apk/res/android">
                <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim28" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
            </animation-list>
        </item>
        <item android:maxLevel="49">
            <animation-list android:oneshot="false"
              xmlns:android="http://schemas.android.com/apk/res/android">
                <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
            </animation-list>
        </item>
        <item android:maxLevel="60">
            <animation-list android:oneshot="false"
              xmlns:android="http://schemas.android.com/apk/res/android">
                <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
            </animation-list>
        </item>
        <item android:maxLevel="75">
            <animation-list android:oneshot="false"
              xmlns:android="http://schemas.android.com/apk/res/android">
                <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
            </animation-list>
        </item>
        <item android:maxLevel="90">
            <animation-list android:oneshot="false"
              xmlns:android="http://schemas.android.com/apk/res/android">
                <item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
                <item android:duration="500" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
            </animation-list>
        </item>
        <item android:drawable="@drawable/stat_sys_battery_charge_anim100" android:maxLevel="100" />
    </level-list>
    ---------------------------------------------------
    Also, if you have 100+100png icons:

    stat_sys_battery.xml
    PHP:
    <?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>

    stat_sys_battery_charge.xml
    PHP:
    <?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_charge_anim0" android:maxLevel="0" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim1" android:maxLevel="1" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim2" android:maxLevel="2" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim3" android:maxLevel="3" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim4" android:maxLevel="4" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:maxLevel="5" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim6" android:maxLevel="6" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim7" android:maxLevel="7" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim8" android:maxLevel="8" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim9" android:maxLevel="9" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim10" android:maxLevel="10" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim11" android:maxLevel="11" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim12" android:maxLevel="12" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim13" android:maxLevel="13" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim14" android:maxLevel="14" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim15" android:maxLevel="15" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim16" android:maxLevel="16" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim17" android:maxLevel="17" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim18" android:maxLevel="18" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim19" android:maxLevel="19" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim20" android:maxLevel="20" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim21" android:maxLevel="21" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim22" android:maxLevel="22" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim23" android:maxLevel="23" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim24" android:maxLevel="24" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim25" android:maxLevel="25" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim26" android:maxLevel="26" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim27" android:maxLevel="27" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim28" android:maxLevel="28" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim29" android:maxLevel="29" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim30" android:maxLevel="30" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim31" android:maxLevel="31" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim32" android:maxLevel="32" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim33" android:maxLevel="33" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim34" android:maxLevel="34" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim35" android:maxLevel="35" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim36" android:maxLevel="36" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim37" android:maxLevel="37" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim38" android:maxLevel="38" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim39" android:maxLevel="39" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim40" android:maxLevel="40" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim41" android:maxLevel="41" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim42" android:maxLevel="42" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim43" android:maxLevel="43" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim44" android:maxLevel="44" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim45" android:maxLevel="45" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim46" android:maxLevel="46" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim47" android:maxLevel="47" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim48" android:maxLevel="48" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim49" android:maxLevel="49" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim50" android:maxLevel="50" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim51" android:maxLevel="51" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim52" android:maxLevel="52" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim53" android:maxLevel="53" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim54" android:maxLevel="54" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim55" android:maxLevel="55" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim56" android:maxLevel="56" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim57" android:maxLevel="57" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim58" android:maxLevel="58" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim59" android:maxLevel="59" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim60" android:maxLevel="60" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim61" android:maxLevel="61" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim62" android:maxLevel="62" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim63" android:maxLevel="63" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim64" android:maxLevel="64" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim65" android:maxLevel="65" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim66" android:maxLevel="66" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim67" android:maxLevel="67" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim68" android:maxLevel="68" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim69" android:maxLevel="69" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim70" android:maxLevel="70" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim71" android:maxLevel="71" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim72" android:maxLevel="72" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim73" android:maxLevel="73" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim74" android:maxLevel="74" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim75" android:maxLevel="75" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim76" android:maxLevel="76" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim77" android:maxLevel="77" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim78" android:maxLevel="78" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim79" android:maxLevel="79" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim80" android:maxLevel="80" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim81" android:maxLevel="81" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim82" android:maxLevel="82" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim83" android:maxLevel="83" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim84" android:maxLevel="84" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim85" android:maxLevel="85" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim86" android:maxLevel="86" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim87" android:maxLevel="87" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim88" android:maxLevel="88" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim89" android:maxLevel="89" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim90" android:maxLevel="90" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim91" android:maxLevel="91" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim92" android:maxLevel="92" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim93" android:maxLevel="93" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim94" android:maxLevel="94" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim95" android:maxLevel="95" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim96" android:maxLevel="96" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim97" android:maxLevel="97" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim98" android:maxLevel="98" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim99" android:maxLevel="99" />
        <item android:drawable="@drawable/stat_sys_battery_charge_anim100" android:maxLevel="100" />
    </level-list>

    try them too! Or any other xml file for charging..
    3
    Force close here. :(

    I've attached my unmodified and modified SystemUI, so you can have a look at those if you want. :)

    Please add your framework files too, 1 and 2.. I will try to do it for you to original file

    or first please try that 2 things;

    <com.erhany.KitKatBattery systemui:batteryView="statusbar" android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="fill_parent" />

    save and compile. if still error try this :

    <com.android.systemui.BatteryMeterView android:visibility="gone" android:id="@id/battery" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" systemui:batteryView="statusbar" />
    <com.erhany.KitKatBattery android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" />

    save and compile.. if this works, you will just need to edit this xml.. First lets be sure that we have icons working
    2
    You, sir, are an absolute genius!

    KitKat has been crying out for this mod since it was released. And Lollipop will need this too.

    Very good work, indeed!


    --------------------------------------
    Sent from my iPad (yes, really)
    ----------------------------------

    Thank you so much Ticklefish.. Still waiting for your tests too.. After all is fine with tested device, I created topic. Hopefully it will work for other devices too..