Related
i searched but found nothing of use..
someone can please explain it to me?
thanks
The xml files within an android build have been compiled and can only be hex-edited.. what are you trying to do?
change a little thing.. i guess hax-editing its ok
how can i do that?
There actually IS a way to view the xml files as plain xml. You can then edit the xml files, but you need to resign the application again.
ok.. im listening
i do it on eclipse?
Download AXMLPrinter2.jar from here:
http://code.google.com/p/android4me/downloads/list
It works very well. I hope that you're not cheating on some game or something...
derfolo said:
Download AXMLPrinter2.jar from here:
http://code.google.com/p/android4me/downloads/list
It works very well. I hope that you're not cheating on some game or something...
Click to expand...
Click to collapse
i want to change color in progress_horizontal.xml
and its a good opportunity to learn
i download it.. where to put it?
derfolo said:
Download AXMLPrinter2.jar from here:
http://code.google.com/p/android4me/downloads/list
It works very well. I hope that you're not cheating on some game or something...
Click to expand...
Click to collapse
I didn't know about that... what a useful tool, thanks.
Guys, after reading about this a bit more, this is what you'll need to do:
1. use the AXMLPrinter2.jar to get the xml file where you can read it.
2. Find the value you are trying to change in the xml file--e.g., color = #FF0000.
3. Edit the binary version of the xml file with a hexeditor and find and replace your variable.
Unfortunately, it seems that no one has figured out how to convert the plain xml back to binary (and make it work) yet. Hope this is all helpful to you!
Barina said:
i want to change color in progress_horizontal.xml
and its a good opportunity to learn
i download it.. where to put it?
Click to expand...
Click to collapse
Put it anywhere you want. Make sure you have java installed, then type:
Code:
java -jar (your path)AXMLprinter2.jar (filename) > (filename.out)
Find the value you want to change, then use a hex editor to make the change to the original binary xml file. Colors are easy to find and change.
ive got this:
Code:
<?xml version="1.0" encoding="utf-8" ?>
- <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@android:01020000">
- <shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#FF9D9E9D" android:endColor="#FF747674" android:angle="270.0" android:centerY="0.75" android:centerColor="#FF5A5D5A" />
</shape>
</item>
- <item android:id="@android:0102000F">
- <clip>
- <shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#80FFD300" android:endColor="#A0FFCB00" android:angle="270.0" android:centerY="0.75" android:centerColor="#80FFB600" />
</shape>
</clip>
</item>
- <item android:id="@android:0102000D">
- <clip>
- <shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#FFFFD300" android:endColor="#FFFFCB00" android:angle="270.0" android:centerY="0.75" android:centerColor="#FFFFB600" />
</shape>
</clip>
</item>
</layer-list>
what to do next?
is that hex editor okay?
http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm#download
edit:
the color is represented with 8 chars and in photoshop its 6 chars.... what a..?!
Barina said:
ive got this:
Code:
<?xml version="1.0" encoding="utf-8" ?>
- <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:id="@android:01020000">
- <shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#FF9D9E9D" android:endColor="#FF747674" android:angle="270.0" android:centerY="0.75" android:centerColor="#FF5A5D5A" />
</shape>
</item>
- <item android:id="@android:0102000F">
- <clip>
- <shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#80FFD300" android:endColor="#A0FFCB00" android:angle="270.0" android:centerY="0.75" android:centerColor="#80FFB600" />
</shape>
</clip>
</item>
- <item android:id="@android:0102000D">
- <clip>
- <shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#FFFFD300" android:endColor="#FFFFCB00" android:angle="270.0" android:centerY="0.75" android:centerColor="#FFFFB600" />
</shape>
</clip>
</item>
</layer-list>
what to do next?
is that hex editor okay?
http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm#download
edit:
the color is represented with 8 chars and in photoshop its 6 chars.... what a..?!
Click to expand...
Click to collapse
I Googled it and came up with this:
"..colors are 8 digit hexidecimal numbers which include the alpha value. The last 6 digits are the RGB values, much like an HTML color. The first 2 digits is the alpha value, and that is what we must set to get a translucent background."
So I am guessing the first 2 digits of the 8 are the background color/transparency, and the rest is what you want to change.
There is a thread by stericson that details this in the theme section. Go to his profile and look through the threads he created or search for
"How to edit xml"
the thread should be linked in the stickies in the theme section
ohhh i see..
okay ill search it later i just noticed that the ColorChange3 can do this..
thanks a lot!
thanks for this programme going to see if van edit a few files here and there. what do i do once i have finished editing the .out file? do i jus rename it back to .xml?
Hi @all,i just decompiled my framework with apkmanager and modified stat_sys_battery.xml. Now it's like this:
Code:
<?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>
. Recompiled with apkmanager,flashed framework but i can't see battery icons in statusbar,but in the framework there are all of the 100 pngs of battery icons. Do i need to delete resources.arsc before recompiling?
ciaox said:
Hi @all,i just decompiled my framework with apkmanager and modified stat_sys_battery.xml. Now it's like this:
Recompiled with apkmanager,flashed framework but i can't see battery icons in statusbar,but in the framework there are all of the 100 pngs of battery icons. Do i need to delete resources.arsc before recompiling?
Click to expand...
Click to collapse
no need to delete anything.
make zzz_stat_sys_battery_1.xml same as stat_sys_battery.xml
and use Apk Manager 4.8 (not 4.9)
Thanks,but where i can find apkmanager 4.8? i only find 4.9. And BTW,i don't have any zzz_stat_sys_battery_1.xml,i only have stat_sys_battery.xml.
Up. (((((((())))))
mendozinas said:
no need to delete anything.
make zzz_stat_sys_battery_1.xml same as stat_sys_battery.xml
and use Apk Manager 4.8 (not 4.9)
Click to expand...
Click to collapse
Would you have to do this for like everything you do in XML files?
Like:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="200" android:drawable="@drawable/stat_sys_upload_anim0" />
<item android:duration="200" android:drawable="@drawable/stat_sys_upload_anim1" />
<item android:duration="200" android:drawable="@drawable/stat_sys_upload_anim2" />
<item android:duration="200" android:drawable="@drawable/stat_sys_upload_anim3" />
<item android:duration="200" android:drawable="@drawable/stat_sys_upload_anim4" />
<item android:duration="200" android:drawable="@drawable/stat_sys_upload_anim5" />
</animation-list>
Or:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<level-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="14">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim0" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim1" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim2" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim3" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim4" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim5" />
</animation-list>
</item>
<item android:maxLevel="29">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim1" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim2" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim3" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim4" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim5" />
</animation-list>
</item>
<item android:maxLevel="49">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim2" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim3" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim4" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim5" />
</animation-list>
</item>
<item android:maxLevel="69">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim3" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim4" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim5" />
</animation-list>
</item>
<item android:maxLevel="89">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim4" />
<item android:duration="1000" android:drawable="@drawable/stat_sys_battery_charge_anim5" />
</animation-list>
</item>
<item android:drawable="@drawable/stat_sys_battery_charge_anim5" android:maxLevel="101" />
</level-list>
Sorry man i can't understand very well english. How can i fix this ugly trouble???
I'm working on fix from almost one week,and got nothing. Help guys this is really important.
Up..
Sent from my LG Optimus One P500 using Tapatalk
I did this on the Eris a while back... Yes, you have to delete resources.arsc before recompiling...
Sent from my Ginger Tazz using XDA App
Macrodroid said:
I did this on the Eris a while back... Yes, you have to delete resources.arsc before recompiling...
Sent from my Ginger Tazz using XDA App
Click to expand...
Click to collapse
Does that extend to framework-res.apk too? Isd that why I get a boot loop if I drop a replacement xml file in?
rootSU said:
Does that extend to framework-res.apk too? Isd that why I get a boot loop if I drop a replacement xml file in?
Click to expand...
Click to collapse
I get the same thing... I've been searching for an answer till this day
Chinam4n said:
I get the same thing... I've been searching for an answer till this day
Click to expand...
Click to collapse
Ive been looking at this:
http://forum.xda-developers.com/showthread.php?t=916814
Particularly post 2
All I need to do is put progress_horizontal.xml into my new theme but even with apk manager decompile and compile, I get a boot loop.
I did the whole delete the modified files from "keep" folder and resources.arsc but no joy.
Dont really know what I am doing.
I know it worked on my previous framework, when mendozinas (UOT) ported it from a theme chooser apk.
Now I just want to move it over to the new framework. There aare alternative progress bar images. I assume all that is needed is the xml, but just cannot do it.
rootSU said:
Ive been looking at this:
http://forum.xda-developers.com/showthread.php?t=916814
Particularly post 2
All I need to do is put progress_horizontal.xml into my new theme but even with apk manager decompile and compile, I get a boot loop.
I did the whole delete the modified files from "keep" folder and resources.arsc but no joy.
Dont really know what I am doing.
I know it worked on my previous framework, when mendozinas (UOT) ported it from a theme chooser apk.
Now I just want to move it over to the new framework. There aare alternative progress bar images. I assume all that is needed is the xml, but just cannot do it.
Click to expand...
Click to collapse
I tried to just make simple edits in the XML, like the battery stats, even adding the "zzz" file I receive a bootloop.
Hi guys it's time to share some of my tips with all themers
1) transparent/custom settings - from meziu and miui
a) transparent
open themes.xml with a good text editor
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
<style name="Theme" parent="@android:style/Theme">
<item name="android:colorBackground">@android:color/transparent</item>
<item name="android:windowBackground">@drawable/background_own</item>
<item name="android:windowShowWallpaper">true</item>
</style>
Now you have to fix blank screen in video-camera and small popups:
Code:
<style name="Theme.NoTitleBar" parent="@android:style/Theme">
<item name="android:windowShowWallpaper">false</item>
</style>
<style name="Theme.Black" parent="@android:style/Theme">
<item name="android:colorBackground">@android:color/black</item>
<item name="android:windowBackground">@drawable/background_own</item>
<item name="android:windowShowWallpaper">false</item>
</style>
<style name="Theme.Light" parent="@android:style/Theme">
<item name="android:windowShowWallpaper">false</item>
</style>
<style name="Theme.Translucent" parent="@android:style/Theme">
<item name="android:windowShowWallpaper">false</item>
</style>
<style name="Theme.NoDisplay" parent="@android:style/Theme">
<item name="android:windowShowWallpaper">false</item>
</style>
<style name="Theme.Panel" parent="@android:style/Theme">
<item name="android:windowShowWallpaper">false</item>
</style>
It's time to fix email, cos it looks weird with transparent bg:
themes.xml:
Code:
<style name="ThemeNoTitleBar.Email" parent="@android:style/Theme.NoTitleBar">
<item name="android:colorBackground">@android:color/black</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
com_android_email.xml:
Code:
<resource-redirections>
<item name="style/ThemeNoTitleBar">@style/ThemeNoTitleBar.Email</item>
</resource-redirections>
Finally we should fix youtube, cos nobody likes transparent bg during watching video clips in full screen mode
themes.xml:
Code:
<style name="Theme.Youtube" parent="@android:style/Theme">
<item name="android:windowBackground">@android:color/black</item>
</style>
com_google_android_youtube.xml:
Code:
<resource-redirections>
<item name="style/Theme">@style/Theme.Youtube</item>
</resource-redirections>
b) custom
Code:
<style name="Theme" parent="@android:style/Theme">
<item name="android:colorBackground">@android:color/transparent</item>
<item name="android:windowBackground">@drawable/background_own</item>
</style>
Nothing else needs to be fixed
2) description color - also known from miui (orange) and meizu (blue)
open colors.xml with a good text editor
Code:
<resources>
<color name="dim_foreground_dark">#ff_your_color</color>
<color name="dim_foreground_dark_disabled">#80_your_color</color>
<color name="dim_foreground_light_inverse">#ff_your_color</color>
<color name="dim_foreground_light_inverse_disabled">#80_your_color</color>
</resources>
3) big ics window title
open themes.xml with a good text editor
Code:
<style name="Theme" parent="@android:style/Theme">
<item name="android:windowTitleSize">50.0dip</item>
</style>
<style name="TextAppearance.WindowTitle" parent="@android:style/TextAppearance">
<item name="android:textSize">21.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ffffffff</item>
</style>
4) ics blue popup title
open themes.xml with a good text editor
Code:
<style name="Theme.Dialog" parent="@android:style/Theme">
<item name="android:textColorPrimary">@color/primary_text_dark_holo</item>
</style>
primary_text_dark_holo.xml
Code:
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="#80ffffff" />
<item android:state_window_focused="false" android:color="#ff33b5e5" />
<item android:state_pressed="true" android:color="#ff000000" />
<item android:state_selected="true" android:color="#ff000000" />
<item android:state_focused="true" android:color="#ff000000" />
<item android:color="#ff33b5e5" />
</selector>
5) withe text for buttons only
open themes.xml with a good text editor
Code:
<style name="Widget.Button" parent="@android:style/Widget">
<item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
<item name="android:textColor">@color/primary_text_light_holo</item>
<item name="android:gravity">center</item>
<item name="android:background">@android:drawable/btn_default</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
primary_text_light_holo.xml
Code:
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/white_disabled" />
<item android:state_window_focused="false" android:color="@color/white" />
<item android:state_pressed="true" android:color="@color/white" />
<item android:state_selected="true" android:color="@color/white" />
<item android:color="@color/white" />
</selector>
6) selected text color
open themes.xml with a good text editor
Code:
<style name="TextAppearance" parent="@android:style/TextAppearance">
<item name="android:textSize">16.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:textColorHighlight">#ff33b5e5</item>
<item name="android:textColorHint">?android:textColorHint</item>
<item name="android:textColorLink">#ff33b5e5</item>
</style>
7) light text on dark popups - it's new I used it for my ICS theme
a) 1st window
open themes.xml with a good text editor
Code:
<style name="TextAppearance.Large.Inverse" parent="@android:style/TextAppearance.Large">
<item name="android:textColor">#ffffffff</item>
<item name="android:textColorHint">#ff000000</item>
</style>
b) 2nd window - thanks to donhu for finding xml
select_dialog_item.xml
Code:
<TextView android:textAppearance="?android:textAppearanceLarge" android:textColor="@color/primary_text_light_holo_only" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@android:id/text1" android:paddingLeft="14.0dip" android:paddingRight="15.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight"
xmlns:android="http://schemas.android.com/apk/res/android" />
select_dialog_multichoice.xml
Code:
<CheckedTextView android:textAppearance="?android:textAppearanceLarge" android:textColor="@color/primary_text_light_holo_only" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@android:id/text1" android:paddingLeft="12.0dip" android:paddingRight="7.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:checkMark="@drawable/btn_check" android:minHeight="?android:listPreferredItemHeight"
xmlns:android="http://schemas.android.com/apk/res/android" />
select_dialog_singlechoice.xml
Code:
<CheckedTextView android:textAppearance="?android:textAppearanceLarge" android:textColor="@color/primary_text_light_holo_only" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@android:id/text1" android:paddingLeft="12.0dip" android:paddingRight="7.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:checkMark="@drawable/btn_radio" android:minHeight="?android:listPreferredItemHeight"
xmlns:android="http://schemas.android.com/apk/res/android" />
primary_text_light_holo_only.xml
Code:
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="#ffe6e6e6" />
<item android:color="#ffffffff" />
</selector>
c) 3th window
open themes.xml with a good text editor
Code:
<style name="Widget.DropDownItem.Spinner" parent="@android:style/Widget.DropDownItem">
<item name="android:textAppearance">@style/TextAppearance.Widget.DropDownItem.Holo</item>
<item name="android:checkMark">@drawable/btn_radio</item>
</style>
<style name="TextAppearance.Widget.DropDownItem.Holo" parent="@android:style/TextAppearance.Widget">
<item name="android:textColor">#ffffffff</item>
</style>
8) other app windows
a) widgetpicker - settings.apk
appwidgetpicker.xml
Code:
<RelativeLayout android:orientation="horizontal" android:paddingTop="2.0dip" android:paddingBottom="2.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@id/appwidgetpicker_imageview" android:layout_width="48.0dip" android:layout_height="48.0dip" android:layout_marginLeft="10.0dip" android:layout_marginTop="2.0dip" android:layout_marginBottom="2.0dip" android:src="@drawable/icon" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="10.0dip" android:layout_marginTop="2.0dip" android:layout_marginBottom="2.0dip" android:layout_toRightOf="@id/appwidgetpicker_imageview" android:layout_centerVertical="true">
<TextView android:textSize="20.0dip" android:textColor="?android:textAppearanceLargeInverse" android:id="@id/appwidgetpicker_textview" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textSize="13.0dip" android:textColor="?android:textAppearanceLargeInverse" android:id="@id/appwidgetpicker_count" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
b) smiley menu - mms.apk/talk.apk
smiley_menu_item.xml
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="?android:listPreferredItemHeight"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_gravity="center_vertical" android:id="@id/smiley_icon" android:layout_width="20.0dip" android:layout_height="20.0dip" android:layout_marginLeft="18.0dip" />
<TextView android:textAppearance="?android:textAppearanceLargeInverse" android:layout_gravity="center_vertical" android:id="@id/smiley_name" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="15.0dip" android:singleLine="true" android:layout_weight="1.0" />
<TextView android:textAppearance="?android:textAppearanceLargeInverse" android:layout_gravity="center_vertical" android:id="@id/smiley_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="10.0dip" android:singleLine="true" />
</LinearLayout>
c) alarm background - deskclock.apk
clock_selector.xml
Code:
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false" android:drawable="@android:color/transparent" />
<item android:state_pressed="true" android:drawable="@drawable/list_selector_background_pressed" />
</selector>
alarm_time.xml
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.deskclock.DontPressWithParentLayout android:gravity="center" android:orientation="vertical" android:id="@id/indicator" android:background="@drawable/clock_selector" style="@style/alarm_list_left_column">
<CheckBox android:layout_gravity="center" android:id="@id/clock_onoff" android:background="@drawable/indicator_clock_onoff" android:focusable="false" android:clickable="false" android:duplicateParentState="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:button="@null" />
<ImageView android:layout_gravity="center" android:id="@id/bar_onoff" android:paddingTop="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_indicator_off" />
</com.android.deskclock.DontPressWithParentLayout>
<ImageView android:gravity="fill_vertical" android:background="@android:color/transparent" android:paddingTop="4.0dip" android:paddingBottom="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/divider_vertical_dark" android:scaleType="fitXY" />
<com.android.deskclock.DigitalClock android:gravity="center_vertical" android:orientation="vertical" android:id="@id/digitalClock" android:paddingLeft="16.0dip" android:paddingRight="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1.0">
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="true">
<TextView android:textSize="28.0sp" android:textColor="?android:textColorPrimary" android:id="@id/timeDisplay" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:includeFontPadding="false" />
<TextView android:textAppearance="?android:textAppearanceSmall" android:textStyle="bold" android:textColor="?android:textColorPrimary" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textAppearance="?android:textAppearanceSmall" android:textStyle="bold" android:textColor="?android:textColorTertiary" android:gravity="right" android:id="@id/label" android:paddingLeft="8.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
<TextView android:textAppearance="?android:textAppearanceSmall" android:textColor="?android:textColorSecondary" android:id="@id/daysOfWeek" android:layout_width="fill_parent" android:layout_height="wrap_content" android:includeFontPadding="false" />
</com.android.deskclock.DigitalClock>
</LinearLayout>
All I ask for is tying some credits using it
This is useful! Thanks, anyway, will some of this mod will work on ICS??
Sent from my Galaxy S i9000 with ICS Build 10 + 1.5ghz OC!!!
What to say to u mate, u r just awesome. Thank u very much for everything you did for me + this
All the best,
Vert
Isn't this guy just amazing?
Great work Ma man.
You're AWESOME Zdune, THANKS!!!
arzbhatia said:
Isn't this guy just amazing?
Great work Ma man.
Click to expand...
Click to collapse
His 100% a themer machine lol...
Sent from my Galaxy S i9000 with ICS Build 10 + 1.5ghz OC!!!
it is only possible in CM7
how to change black setting background in stock android 2.3 roms
Very Useful ! Thanks guy
and please post tutorial for how to change
poweroff menu text background
Just awesome!
This should be a sticky thread
Regards, D_d
you should also mention where to find each .xml, inframework-res.apk, in email.apk, etc..
Thanks for this! Your the man. Happy Holidays!
Sent from my Nexus S 4G using Tapatalk
@chrisrotolo good themers will know where to find correct files
Nice work, zdune, nice to know there's a place where you can find more detailed theming instructions.
Sent from my HTC_Amaze_4G using XDA App
I report to mod to make this sticky!
Sent from my Galaxy S i9000 with ICS Build 10 + 1.5ghz OC!!!
@DaxIΠFIΠITY would be nice anyway some of them might work on cm9/aosp ics
ZduneX25 said:
@DaxIΠFIΠITY would be nice anyway some of them might work on cm9/aosp ics
Click to expand...
Click to collapse
Cool! Will check it out soon!
Sent from my Galaxy S i9000 with ICS Build 10 + 1.5ghz OC!!!
themes.xml??
What?
There should be a themes.xml in framework-res.apk?
srry, don't understand!
@mDroidd guide for linux users, building it over windows may brings problems
ZduneX25 said:
@mDroidd guide for linux users, building it over windows may brings problems
Click to expand...
Click to collapse
god yes, I hate windows. I'm on Ubuntu. If I decompiled framework-Res.apk, what do I need to do then?
Greets
____________
mDroid - Tapatalk
Phone: LG-P500
ROM: Nitrogen.
Kernel: franco .35
Theme: ICS (by me)
Tweaks: ALL (knzo)
Wishlist: Galaxy Nexus
I found quite a few themes, but the original creators don't provide a guide, or leave you to decompile theirs which seems to cause issues with a rebuilt version. In light of this, I will provide a guide on the easy process of developing a theme for TSF Shell.
You will need Eclipse and all the usual Android app development stuff installed. This guide will not be covering that aspect.
Set up a basic app, you also need to include an empty activity. This part is not overly important.
AndroidManifest.xml
Your empty activity needs to specify that it is a theme
Code:
<intent-filter>
...
<action android:name="com.tsf.shell.themes" />
...
</intent-filter>
You will need an assets folder, which will be the base of your theme. It will include:
A subfolder named theme, with subfolders preview, widget, shell, and icon. These will be where the theme parts go.
PreviewDescription.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme>
<version value="1" />
<info date="CREATION_DATE" author="YOUR_NAME" name="THEME_NAME"/>
<preview frontcover="IMAGE_FOR_THEME_ICON">
<item image="PREVIEW_IMAGE" />
<item image="PREVIEW_IMAGE" />
<item image="PREVIEW_IMAGE" />
</preview>
</theme>
The capitalized words should be replaced by the file names of the files that will be placed in the preview folder. These file names can be whatever you like, as long as they match the values listed here.
The widget folder is somewhat specific. It contains a subfolder named "com.tsf.shell.widget.folder" with the files "widget_folder_bg.png", "widget_folder_front.png", and "widget_folder_icon.png" which should be replaced by the images you want for each of these items.
ThemeDesription.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme>
<version value="1" />
<icon-default scale="0.70" leftOffset="0" rightOffset="0"
topOffset="0" bottomOffset="0">
<item image="default" />
<item image="default2" />
<item image="default3" />
<item image="default4" />
<item image="default5" />
</icon-default>
<icon-filter>
<item component="com.android.vending/com.android.vending.AssetBrowserActivity"
image="gplay" />
<item component="com.android.vending/com.google.android.finsky.activities.PlayLauncherActivity"
image="gplay" />
<item component="com.android.mms/com.android.mms.ui.ConversationList"
image="messaging" />
</icon-filter>
<widget>
<item type="widget_system_folder">
<icon image="widget_folder_icon"/>
<nameText size="14" color="#FF333333" x="20" y="-6" width="86" height="23"/>
<sizeText size="14" color="#FF99CC00" colorFull="#FFFF3300" width="16" height="20" x="101" y="9"/>
<frame image="widget_folder_windows_bg"/>
<order>
<backPlane x="0" y="17" width="128" height="32" image="widget_folder_bg"/>
<childContainer x="0" y="-23"/>
<frontPlane x="0" y="-31" width="128" height="64" image="widget_folder_front"/>
<textPlane x="0" y="-43" width="128" height="32"/>
<cachePlane width="128" height="128"/>
</order>
<child>
<item x="0" y="-5" z="0" rx="0" ry="0" rz="0" sx="1" sy="1" sz="1" />
<item x="-2" y="5" z="0" rx="0" ry="0" rz="-20" sx="1" sy="1" sz="1" />
<item x="5" y="15" z="0" rx="0" ry="0" rz="20" sx="1" sy="1" sz="1" />
</child>
</item>
</widget>
<shell>
<pageController image="page_controller_miui_w"/>
<pageControllerIndicator image="page_controller_indicator_miui_w" offsetX="14" offsetY="7" angleUnit="23" angleOffset="1"/>
<deleteController imageOpen="control_del_open_miui_w" imageClose="control_del_close_miui_w"/>
<menu toolButton="menu_tool_button_miui_w" themeButton="menu_theme_button_miui_w" userButton="menu_user_button_miui_w" settingButton="menu_setting_button_miui_w" bg="menu_bg_miui_w" bgOffsetX="1" />
<applicationPage effectButton="application_page_effect_button_miui_w"
nvPoint="application_page_nv_point" />
<pagePreview select="shell_select_page_bg_select_miui_w"
unselect="shell_select_page_bg_unselect_w" transitionButton="application_transition_button_miui" />
<transitionButton image="application_transition_button_miui" />
<linePickerMenu image="shell_picker_menu_item_miui_w" notic="shell_picker_menu_item_text_bg_miui_w" />
<interactiveArrange bg="shell_interactive_grid_bg_miui_w"
scaleButton="shell_interactive_grid_scale_button_miui_w" />
<publicButton close="public_button_close_miui_w" return="public_button_return_miui_w" />
<app multiChoice="shell_multi_choice_miui" />
</shell>
<wallpaper default="1">
<item image="wallpaper1" thumb="wallpaper1_thumb" />
<item image="wallpaper2" thumb="wallpaper2_thumb" />
<item image="wallpaper3" thumb="wallpaper3_thumb" />
<item image="wallpaper4" thumb="wallpaper4_thumb" />
</wallpaper>
</theme>
The above is an excerpt from an existing theme to help you determine what goes where. The important parts are icon-default scale="0.70" which is the size of the original icon that will be placed within the "generic" background, which is specified by the item image values within the icon-default class. Everything surrounds the ThemeDescription, so if you want to change something, this is usually where.
Back to the icon and shell folders. This is where you will place images you want used for each app and the parts of the interface. How the theme will handle missing icons was covered by the theme description so don't worry if you don't have one for everything. These items should already have been specified by the ThemeDescription, so now it is just filling in the pictures.
Sent from my Jailbroken iPad 3
twistedumbrella said:
I found quite a few themes, but the original creators don't provide a guide, or leave you to decompile theirs which seems to cause issues with a rebuilt version. In light of this, I will provide a guide on the easy process of developing a theme for TSF Shell.
You will need Eclipse and all the usual Android app development stuff installed. This guide will not be covering that aspect.
Set up a basic app, you also need to include an empty activity. This part is not overly important.
AndroidManifest.xml
Your empty activity needs to specify that it is a theme
Code:
<intent-filter>
...
<action android:name="com.tsf.shell.themes" />
...
</intent-filter>
You will need an assets folder, which will be the base of your theme. It will include:
A subfolder named theme, with subfolders preview, widget, shell, and icon. These will be where the theme parts go.
PreviewDescription.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme>
<version value="1" />
<info date="CREATION_DATE" author="YOUR_NAME" name="THEME_NAME"/>
<preview frontcover="IMAGE_FOR_THEME_ICON">
<item image="PREVIEW_IMAGE" />
<item image="PREVIEW_IMAGE" />
<item image="PREVIEW_IMAGE" />
</preview>
</theme>
The capitalized words should be replaced by the file names of the files that will be placed in the preview folder. These file names can be whatever you like, as long as they match the values listed here.
The widget folder is somewhat specific. It contains a subfolder named "com.tsf.shell.widget.folder" with the files "widget_folder_bg.png", "widget_folder_front.png", and "widget_folder_icon.png" which should be replaced by the images you want for each of these items.
ThemeDesription.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme>
<version value="1" />
<icon-default scale="0.70" leftOffset="0" rightOffset="0"
topOffset="0" bottomOffset="0">
<item image="default" />
<item image="default2" />
<item image="default3" />
<item image="default4" />
<item image="default5" />
</icon-default>
<icon-filter>
<item component="com.android.vending/com.android.vending.AssetBrowserActivity"
image="gplay" />
<item component="com.android.vending/com.google.android.finsky.activities.PlayLauncherActivity"
image="gplay" />
<item component="com.android.mms/com.android.mms.ui.ConversationList"
image="messaging" />
</icon-filter>
<widget>
<item type="widget_system_folder">
<icon image="widget_folder_icon"/>
<nameText size="14" color="#FF333333" x="20" y="-6" width="86" height="23"/>
<sizeText size="14" color="#FF99CC00" colorFull="#FFFF3300" width="16" height="20" x="101" y="9"/>
<frame image="widget_folder_windows_bg"/>
<order>
<backPlane x="0" y="17" width="128" height="32" image="widget_folder_bg"/>
<childContainer x="0" y="-23"/>
<frontPlane x="0" y="-31" width="128" height="64" image="widget_folder_front"/>
<textPlane x="0" y="-43" width="128" height="32"/>
<cachePlane width="128" height="128"/>
</order>
<child>
<item x="0" y="-5" z="0" rx="0" ry="0" rz="0" sx="1" sy="1" sz="1" />
<item x="-2" y="5" z="0" rx="0" ry="0" rz="-20" sx="1" sy="1" sz="1" />
<item x="5" y="15" z="0" rx="0" ry="0" rz="20" sx="1" sy="1" sz="1" />
</child>
</item>
</widget>
<shell>
<pageController image="page_controller_miui_w"/>
<pageControllerIndicator image="page_controller_indicator_miui_w" offsetX="14" offsetY="7" angleUnit="23" angleOffset="1"/>
<deleteController imageOpen="control_del_open_miui_w" imageClose="control_del_close_miui_w"/>
<menu toolButton="menu_tool_button_miui_w" themeButton="menu_theme_button_miui_w" userButton="menu_user_button_miui_w" settingButton="menu_setting_button_miui_w" bg="menu_bg_miui_w" bgOffsetX="1" />
<applicationPage effectButton="application_page_effect_button_miui_w"
nvPoint="application_page_nv_point" />
<pagePreview select="shell_select_page_bg_select_miui_w"
unselect="shell_select_page_bg_unselect_w" transitionButton="application_transition_button_miui" />
<transitionButton image="application_transition_button_miui" />
<linePickerMenu image="shell_picker_menu_item_miui_w" notic="shell_picker_menu_item_text_bg_miui_w" />
<interactiveArrange bg="shell_interactive_grid_bg_miui_w"
scaleButton="shell_interactive_grid_scale_button_miui_w" />
<publicButton close="public_button_close_miui_w" return="public_button_return_miui_w" />
<app multiChoice="shell_multi_choice_miui" />
</shell>
<wallpaper default="1">
<item image="wallpaper1" thumb="wallpaper1_thumb" />
<item image="wallpaper2" thumb="wallpaper2_thumb" />
<item image="wallpaper3" thumb="wallpaper3_thumb" />
<item image="wallpaper4" thumb="wallpaper4_thumb" />
</wallpaper>
</theme>
The above is an excerpt from an existing theme to help you determine what goes where. The important parts are icon-default scale="0.70" which is the size of the original icon that will be placed within the "generic" background, which is specified by the item image values within the icon-default class. Everything surrounds the ThemeDescription, so if you want to change something, this is usually where.
Back to the icon and shell folders. This is where you will place images you want used for each app and the parts of the interface. How the theme will handle missing icons was covered by the theme description so don't worry if you don't have one for everything. These items should already have been specified by the ThemeDescription, so now it is just filling in the pictures.
Sent from my Jailbroken iPad 3
Click to expand...
Click to collapse
This is a great guide! Thanks for this! I must say tfs shell is just great and some minor bugs but it can be solved with proper attention and spare time for decompile and recompile!
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.
--GUIDE--
Click to expand...
Click to collapse
**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!
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..
Erhany said:
reserved.
Click to expand...
Click to collapse
Good Work Bro :good:
Tested GENERAL MOBILE DISCOVERY
MTK6589 AOSP KK OK
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)
----------------------------------
Ticklefish said:
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)
----------------------------------
Click to expand...
Click to collapse
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..
Erhany said:
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..
Click to expand...
Click to collapse
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)
----------------------------------
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.
Anyways, I'm really happy to finally be able to change the battery icon! Great work! :good:
WhiteNeo said:
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.
Anyways, I'm really happy to finally be able to change the battery icon! Great work! :good:
Click to expand...
Click to collapse
This might be pretty simple to do in just xml. Depends what your status_bar.xml looks like..
-----------------------------------
Sent From Tapatalk
--------------------------------
WhiteNeo said:
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.
Anyways, I'm really happy to finally be able to change the battery icon! Great work! :good:
Click to expand...
Click to collapse
Thank you, try it and reply the topic again please..
Erhany said:
Thank you, try it and reply the topic again please..
Click to expand...
Click to collapse
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.
WhiteNeo said:
Force close here.
I've attached my unmodified and modified SystemUI, so you can have a look at those if you want.
Click to expand...
Click to collapse
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" />
Click to expand...
Click to collapse
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" />
Click to expand...
Click to collapse
save and compile.. if this works, you will just need to edit this xml.. First lets be sure that we have icons working
Erhany said:
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
Click to expand...
Click to collapse
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
WhiteNeo said:
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.
Click to expand...
Click to collapse
Erhany said:
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
Click to expand...
Click to collapse
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
-----------------------------
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.. :/
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
New battery icons By me
Orochixxx said:
New battery icons By me
Click to expand...
Click to collapse
Very nice!
-------------------------------
Sent Via Tapatalk
-----------------------------
Hi sir, i had a problem when recompile it with apktool,
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:
Ar3Z said:
Hi sir, i had a problem when recompile it with apktool,
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:
Click to expand...
Click to collapse
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...
Ticklefish said:
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...
Click to expand...
Click to collapse
Thank,s sir, it's work's
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.
Click to expand...
Click to collapse
....
Maybe you can help me here too?