HD on and off xml - Samsung Galaxy Nexus

i was using apktool and looking through some xml files in systemUI and i found this in res/drawable
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false" android:drawable="@drawable/hd_off" />
<item android:drawable="@drawable/hd_on" />
</selector>
i was just wondering if anyone knew what this was and or what would happen in i changed it to state_checked="true"
thanks

Related

[IN DEPTH GUIDE] How to easily change your battery icons

G'Day XDA,
I have written a bit of a guide to changing your battery icons in a way which is quite easy to do. There are a couple of ways to do it, and depending on your framework and mods depends on how you will need to do it. And before you do anything, please make a Nandroid backup using ClockworkMod Recovery. I will NOT be held responsible if you brick your phone, but I will try my best to help you if the inevitable happens.
On my SGSII I run an odexed 4.0.3 XWLPI stock ROM which has JKay's Deluxe framework & Deluxe Settings app, so I can easily choose to theme my battery icon. There are a number of different icons and ways to create them on XDA, I downloaded mine from shayne77's Battery Mod Tool thread which has quite a few, or if you're that way inclined then you can make your own.
Ok so first things first, you will need a rooted phone and some sort of file explorer that can navigate down to the root folders. I use ES File Explorer but it's personal preference. You will also need a computer with a USB cable that can connect into your phone and a zip program like 7Zip. If you don't have a ROM that currently supports % battery icons then you will need something like APK Tool to decompile and recompile SystemUI.apk . You will also need a text editor like Notepad++ to edit the XML file. The last thing that you may need (if you want to create your own icons or modify any) is a program like Photoshop, but I use Greenfish Icon Editor Pro.
You will need to download/make the icons that you want. Then you need to make sure that they are named accordingly to your SystemUI.apk's /res/drawable-hdpi folder. I use JKay's framework, so mine are named jkay_stat_sys_battery_0.png through to jkay_stat_sys_battery_100.png and then jkay_stat_sys_battery_charge_anim0.png through to jkay_stat_sys_battery_charge_anim100.png . Yours may be named without the jkay at the start if you don't use his framework.
If your ROM currently doesn't support % battery icons then I will show you how to do that. It involves decompiling SystemUI.apk, editing an XML file and then recompiling and flashing and will be detailed in the 3rd post..
Ok now once you have all of the things I mentioned above, you will need to use your file explorer to navigate to /system/app and make a copy of SystemUI.apk .
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I use a folder on my phone's SD card called Mods so I know where everything is. You will then need to plug the phone into the computer and copy SystemUI.apk onto your computer. Again, I use a folder called Mods.
Now right click on SystemUI.apk, hover over 7Zip click Open archive.
When the window opens, double click on res and then double click on drawable-hdpi. Have a look in this folder for a number of icons which will be named something like stat_sys_battery_0.png or jkay_stat_sys_battery_0.png and make note of what they are named. This is what you will need to be renaming the icons that you have downloaded or made, unless of course they already have the same names.
Once all 202 icons have the same names as the ones in the /res/drawable-hdpi folder, you now need to select them all and drag them into the 7Zip archive which you have open. When the prompt asks you if you are sure that you would like to copy the files to the archive, click Yes. Then close the archive.
Now you need to plug your phone back into the computer (unless you left it plugged in from before) and copy your newly modded SystemUI.apk back onto your phone's internal SD Card. Once this is done you can unplug the phone from the computer (unless you are charging it) and open up your file explorer. Navigate to where your newly modded SystemUI.apk is stored and then move it to /system. Once that is done navigate to /system.
Now find the SystemUI.apk that you have modified and long press on it to bring up the menu and click on Properties. When you click on Properties a new window will open up which looks like this.
Notice how the permissions are set to rw- rw- rw-? This needs to be changed. So click on the Change button.
Once you have done that, you will see a new window which looks like the screenshot with a bunch of check boxes and ticks in some of them. We need to uncheck the ticks in the write column in the Group row and the Other row. Yours should now look like this. Click OK.
Now notice how the permissions have changed to rw- r-- r--? This is what we want.
Now long press on SystemUI.apk and select Move To and move it to /system/app.
A window will appear asking if you are sure that you want to overwrite your existing SystemUI.apk. Click yes.
Now restart the phone. And once it reboots, you will be left with your new battery icon! Simple!!!
Another way to change your battery icon is to use a flashable zip file. I use VRTheme zips for all of my mods and they work really well. I have attached 4 flashable zips below, 2 each of the Big Android Battery (which I use) and the Little Android Battery, and one of each is for users with JKay's framework and one of each without. You can download these and flash them through ClockworkMod Recovery, but don't forget to make a Nandroid backup!
Big Android Battery
JKay Big Android Battery
Little Android Battery
JKay Little Android Battery
If you want to use different icons, you can still download the zip which suits your framework and just change the icons for the ones that you want. You will need to download the zip file to your computer and then when it's finished, right click on it and hover over 7Zip and click on Open archive.
Once the window opens, double click on vrtheme then system then app and you should see a folder called SystemUI.apk . Double click on this, then on res and drawable-hdpi. In that folder there should be 202 png icons which are the battery icons.
Simply drag your renamed icons into the folder, click Yes when the prompt asks you if you are sure that you want to add the files to the archive and when that's done simply close the archive.
Now copy the zip file back onto your phone's internal SD card and flash through ClockworkMod Recovery! Simple!!!
Now if you have a ROM that doesn't currently support % battery icons, then this next section if for you. You will need to use a program like APK Tool to decompile your SystemUI.apk, but before you do that you will need to install the Android SDK and the JRE. If you don't know how to do this, then have a look at this post & video on how to download and install the correct components.
You will need to have APK Tool installed to ddecompile and recompile, and if you click on the link that will guide you through how to install that.
Once that is installed you will need to copy SystemUI.apk from /system/app onto your computer, and then you will need to move it to the folder place-apk-here-for-modding which is inside your new APK Tool folder.
Once the apk is in that folder, go back one level to the main folder of APK Tool and click on Script.bat and a Windows Command Prompt should open up with a bunch of green writing.
Type 22 in the Please make your decision: field which will Set current project and press Enter. Now type in the number to the left of SystemUI.apk and press Enter. You should be back on the main screen of the APK Tool script, and up the top on the right it should say Current-App: SystemUI.apk .
Now in the Please make your decision: field type 9 which is for Decompile apk and press Enter. APK Tool will now decompile your SystemUI.apk (this can sometimes take a while). When that is finished, close the script window and double click on the folder projects. When this opens, double click on SystemUI.apk .
Now double click on res. You will see a number of folders. The battery icons that you downloaded or made before, copy them all into drawable-hdpi and say yes to overwrite any battery icons that were previously in the folder. Go back one level to res and then double click on drawable and when that opens up, double click on stat_sys_battery.xml to open it with Notepad++. When that opens, you should see the following:
Notice how there are only a few lines on there with different levels of max battery?
We need to change this to have all 101 levels of battery (from 0 to 100). This may take a while, but you need to make sure that every number from 0 to 100 has it's own line. Your end result should look 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>
You will then need to save and close the file. Now that you have done that, it should mean that once you have flashed that file, you will have a different icon show for each percentage that the battery loses while it's discharging. Once that's done, you will need to do the same for stat_sys_battery_charge.xml and again every number from 0 to 100 needs its own line. Your end result should look 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_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="499" />
<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>
Again save and close the file. What you have just done will give you an icon for every percentage that the battery recharges. On JKay's Deluxe framework, the icon fills up every second or 2 and displays the percentage that it has charged to so far. I can show you how to do that, but it takes a lot more coding that what we have done above. If I get enough requests then I may do that for you, we'll see.
Ok so once you have edited and saved both of those files, you will need to go back to the main folder of APK Tool and click on Script.bat . Once that opens, choose option 22 again and press enter. When you see the list of apks that are available for modding, type the number to the left of SystemUI.apk and press enter.
You should now be back on the main screen of the script. Type 11 for Compile apk and press enter. The words Building apk should now appear down the bottom of the script screen. Be patient, this can sometimes take a while.
Once it has finished building (you shouldn't get any errors) it will ask 'Is this a system apk?' to which you type y and press enter.
After you do this it will ask 'Aside from the signatures, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors' to which you type n and press enter.
Then APK Tool will do it's thing and you will be back on the main screen of the script. Close the script window and double click on the place-apk-here-for-modding folder. When inside that folder you should have a new apk called unsignedSystemUI.apk which is your newly modified apk. You will need to right click on this, hover over 7Zip and select Open archive.
When the new window opens, double click on res, then drawable and highlight stat_sys_battery.xml and stat_sys_battery_charge.xml and drag them both either onto your desktop or into a separate Mods folder (or something simliar). We will need to use these files soon.
There are 2 ways to apply the changes to your phone. You can either use a flashable zip (which I have attached), you can take the xml files out of this new apk and drop them into your original apk, push it to /system/app, change the permissions and restart your phone.
The first one is the one I use, it is the most easy for me. The flashable zip that I have attached is a VRTheme zip.
Flashable Zip
What you need to do is save the zip onto your computer and open the archive with 7Zip. When that opens, double click on vrtheme, then double click on system, then double click on app. Again you will see a folder called SystemUI.apk.
Double click on SystemUI.apk then double click on res and you will see 2 folders, drawable and drawable-hdpi.
You need to drag the 2 xml files that we just took out of our modded apk into drawable and then you need to drag all of your battery icons into drawable-hdpi.
*EDIT* I've been told by a very knowledgable source (thanks Spannaa) that it's a good idea to include the new resources.arsc into the zip because if you ever decompile SystemUI.apk again, any of the PNGs that are not in the original apk will be removed. When including resources.arsc to the zip file it needs to be added without compression. I use Winrar just for resources.arsc when creating new flashable zips.
Now you need to close the archive window. This will save the zip file. Then connect your phone to the computer, drag the zip file onto the internal SD card of the phone and wait for the media scanning to complete. Then you can reboot to recovery, flash the zip file and reboot the phone and you should see your nice new % battery icons. Done!
The second way that you can apply the changes to your phone is to drag the newly modded xml files and the icons into the original SystemUI.apk and push that to /system/app. Ok so what you have to do is go into the APK Tool main folder and then double click on place-apk-here-for-modding. Find SystemUI.apk and copy it onto your desktop.
Then you need to right click on SystemUI.apk, hover over 7Zip and click Open archive.
When this opens you need to double click on res. If you haven't already done it, then double click on drawable-hdpi and drag all of the battery icons that you have downloaded/made into the folder. Once that's done, go back one level to res.
Now double click on drawable. Drag your modified stat_sys_battery.xml and stat_sys_battery_charge.xml into this folder. Now close the window.
Connect your phone to the computer and open the explorer that allows you to see what's in your phone on your computer screen. Now drag your newly modded SystemUI.apk into your phone's internal SD card folder.
Once this is done you can unplug the phone from the computer & open up your file explorer. Navigate to your newly modded SystemUI.apk & move it to /system. Once that is done navigate to /system.
Now find the SystemUI.apk that you have modified & long press on it to bring up the menu. Click on Properties.
When you click on Properties a new window will open up which looks like this.
Notice how the permissions are set to rw- rw- rw-? This needs to be changed. So click on the Change button.
Once you have done that, you will see a new window which looks like the screenshot with a bunch of check boxes and ticks in some of them. We need to uncheck the ticks in the write column in the Group row and the Other row. Yours should now look like this. Click OK.
Now notice how the permissions have changed to rw- r-- r--?This is what we want.
Now long press on SystemUI.apk and select Move To and move it to /system/app.
A window will appear asking if you are sure that you want to overwrite your existing SystemUI.apk. Click yes.
Now restart the phone. And once it reboots, you will be left with your new % battery icon!
I hope you found this guide helpful. If you did you may click the Thanks button to show your appreciation. If you don't want to then that is fine, a simple reply to the thread to let me know if it worked for you would make me happy.
A few thanks are needed to be given:
shayne77 - for his Battery Mod Tool
_JKay_ - for his brilliant Deluxe framework and Deluxe Settings apk
Spannaa - for giving me the knowledge to do this guide and for being an all around helpful awesome guy
Thanks XDA, enjoy.
Dave
unzip systemUI.apk tahn put your images of battery in res/drawable-hdpi ( that will about 204)
zip again sign it with an signer and done
Update
I just updated the 3rd post of this guide with a bit of new information about resources.arsc (thanks again Spannaa) so if anyone has used the guide to create a % battery in their ROM then please have a look at the edit in the 3rd post.
Cheers,
Dave
Or you could use UOT Kitchen
Awesome guide for newbies though
Sent from my Ace 2 running 4.1.2 JB
Fzee said:
Or you could use UOT Kitchen
Awesome guide for newbies though
Click to expand...
Click to collapse
I'd say the opposite - it's much better to learn how to mod stuff yourself.
UOT is great for people who can't...

[GUIDE][RES] Android Animation XML resources for Activity Transition

FEATURED IN XDA NEWS ! App Animation XMLs Made Easy
Click to expand...
Click to collapse
When i was making my first app, I wanted to add some Transitions for my Activities. But didn't know how to make the anim xml files. So , I searched Google Got some pretty simple animations that would be useful for any app developer.
appear.xml - make an it just *appear*
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="1"
android:fromAlpha="1.0"
android:toAlpha="1.0"/>
</set>
fadein.xml - make it slowly fade into view
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="300"
android:repeatCount="0" />
</set>
fadeout.xml - make it slowly fade out of view
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="300"
android:repeatCount="0" />
</set>
push_down_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="-100%p" android:toYDelta="0" android:duration="400"/>
</set>
push_down_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="400"/>
</set>
push_right_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-100%p" android:toXDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_left_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_left_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="-100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
push_right_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
push_up_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_up_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0" android:toYDelta="-100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
rotation.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="-90"
android:pivotX="50%"
android:pivotY="50%"
android:duration="0" android:fillAfter="true">
</rotate>
scale_towards_corner.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale android:fromYScale="1.0" android:toYScale="0"
android:fromXScale="1.0" android:toXScale="0"
android:duration="500"/>
</set>
scale_from_corner.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale android:fromYScale="0" android:toYScale="1.0"
android:fromXScale="0" android:toXScale="1.0"
android:duration="500" android:pivotX="100%"
android:pivotY="100%" />
</set>
shrink_and_rotate_a.xml [exit]
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:fromXScale="1.0" android:toXScale="0.8"
android:fromYScale="1.0" android:toYScale="0.8"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="100"
/>
<scale
android:fromXScale="1.0" android:toXScale="0.0"
android:fromYScale="1.0" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="150"
android:startOffset="100"
/>
shrink_and_rotate_b.xml [entrance]
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:fromXScale="0.0" android:toXScale="1.0"
android:fromYScale="1.0" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="150"
android:startOffset="250"
/>
<scale
android:fromXScale="0.8" android:toXScale="1.0"
android:fromYScale="0.8" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="100"
android:startOffset="400"
/>
To modify the speed of the animation you can edit the android:duration parameter (in milliseconds).
USAGE:
Using an Animation file is simple :
Just place the required xml files inside res/anim/ folder.
And call the required animation by using R.anim.animation_name
For example, to add a transition while calling an activity, You can use overridePendingTransition(R.anim.fadein,R.anim.fadeout);
DOWNLOADING THE ANIMATION RESOURCES:
You can either manually copy the required xml file's content from above (or) You can also download the entire package that i have attached along with this thread. (or) You can click this link and download it.
More animations will be added in future ! :good:
Reserved for updates
Sorry... Reserved for updates
And that is everything?! Cool.
Thanks. :good:
nikwen said:
And that is everything?! Cool.
Thanks. :good:
Click to expand...
Click to collapse
I'll be adding more such animations in future ... along with a small guide for ACtivity Transitions, Dialog animations , and small UI animations etc .. :good:
Beautiful guide :fingers-crossed:
I would like to make screen rotate when I rotate my device, showing the rotation animation. Should I put a file with "rotation.xml" codes into /system/framework/framework-res.apk/res/anim ?
My device is a Samsung Galaxy Ace-i (gt-s5830i) with Gingerbread 2.3.6
thanks for replies :victory:
erpejo96 said:
Beautiful guide :fingers-crossed:
I would like to make screen rotate when I rotate my device, showing the rotation animation. Should I put a file with "rotation.xml" codes into /system/framework/framework-res.apk/res/anim ?
My device is a Samsung Galaxy Ace-i (gt-s5830i) with Gingerbread 2.3.6
thanks for replies :victory:
Click to expand...
Click to collapse
App development (which this guide is for) is very different to ROM modifications. I think that it will not work. However, it would be worth a try.
Why don't you ask your favourite ROM developer to add this to his ROM?
Nice work keep it up
Sent from my GT-S5302 using Tapatalk 2
nanospedy said:
Tanks forme sharing
Click to expand...
Click to collapse
Please do not get your first 10 posts for posting in the dev section just by posting messages which all are only "thanks".
cool thread, thanks.
do you know off-hand how many are compatible with api10?
I was trying to get Card flip working, but objectanimator is only for 11+
http://developer.android.com/training/animation/cardflip.html <--card flip
Thanks really helpful! :thumbup:
Sent from my GT-I9300 using xda app-developers app
mne_gk said:
Thanks really helpful! :thumbup:
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
@mne_gk ... READ THIS .... ↓↓
nikwen said:
Please do not get your first 10 posts for posting in the dev section just by posting messages which all are only "thanks".
Click to expand...
Click to collapse
@out of ideas ... You could have a look at the NineOldAndroids Libraries for for using the Honeycomb (Android 3.0) animation API on all versions of the platform back to 1.0....
out of ideas said:
cool thread, thanks.
do you know off-hand how many are compatible with api10?
I was trying to get Card flip working, but objectanimator is only for 11+
http://developer.android.com/training/animation/cardflip.html <--card flip
Click to expand...
Click to collapse
Thanks man. Will give it a try.
Thanks for the animations! I'm adding another one I wanted to implement, similar to the effect you can see on Android 4.x drawer. I couldn't find a good name for it, but it is the effect of the second activity coming from back and fading in. It uses scale and alpha transitions:
(sorry add the schemas url by yourself, I'm not allowed to publish urls)
Code:
<?xml version="1.0" encoding="utf-8"?>
<set >
<scale
android:fromXScale="0.7"
android:toXScale="1.0"
android:fromYScale="0.7"
android:toYScale="1.0"
android:duration="300"
android:repeatCount="0"
android:pivotX="50%"
android:pivotY="50%"
android:interpolator="@android:anim/accelerate_interpolator"/>
<alpha
android:fromAlpha="0"
android:toAlpha="1"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="300"/>
</set>
Shrink!
Great post!
You should add a shrink/grow transition, I've seen this transition around the web.
scale_towards_corner:
Code:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale android:fromYScale="1.0" android:toYScale="0"
android:fromXScale="1.0" android:toXScale="0"
android:duration="500"/>
</set>
scale_from_corner:
Code:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale android:fromYScale="0" android:toYScale="1.0"
android:fromXScale="0" android:toXScale="1.0"
android:duration="500" android:pivotX="100%"
android:pivotY="100%" />
</set>
transition:
Code:
overridePendingTransition(R.anim.scale_from_corner, R.anim.scale_towards_corner);
shrink_and_rotate_a [exit]:
Code:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:fromXScale="1.0" android:toXScale="0.8"
android:fromYScale="1.0" android:toYScale="0.8"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="100"
/>
<scale
android:fromXScale="1.0" android:toXScale="0.0"
android:fromYScale="1.0" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="150"
android:startOffset="100"
/>
shrink_and_rotate_b [entrance]:
Code:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:fromXScale="0.0" android:toXScale="1.0"
android:fromYScale="1.0" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="150"
android:startOffset="250"
/>
<scale
android:fromXScale="0.8" android:toXScale="1.0"
android:fromYScale="0.8" android:toYScale="1.0"
android:pivotX="50%p" android:pivotY="50%p"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="100"
android:startOffset="400"
/>
transition:
Code:
overridePendingTransition(R.anim.shrink_and_rotate_b, R.anim.shrink_and_rotate_a);
Thanks for sharing!
Additonal tools for a first time developer?
Hey,
Im developing my first android app too and I find it hard to deal with the graphics, is there any site that sells such ready to use graphics?
I saw that I can buy some at binpress.com and also at crowdi.me, does anyone know these sites and/or can recommened more tools?
Thanks,
ItaS
niranjan94 said:
When i was making my first app, I wanted to add some Transitions for my Activities. But didn't know how to make the anim xml files. So , I searched Google Got some pretty simple animations that would be useful for any app developer.
appear.xml - make an it just *appear*
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="1"
android:fromAlpha="1.0"
android:toAlpha="1.0"/>
</set>
fadein.xml - make it slowly fade into view
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="300"
android:repeatCount="0" />
</set>
fadeout.xml - make it slowly fade out of view
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="300"
android:repeatCount="0" />
</set>
push_down_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="-100%p" android:toYDelta="0" android:duration="400"/>
</set>
push_down_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="400"/>
</set>
push_right_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-100%p" android:toXDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_left_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_left_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="-100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
push_right_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
push_up_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_up_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0" android:toYDelta="-100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
rotation.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="-90"
android:pivotX="50%"
android:pivotY="50%"
android:duration="0" android:fillAfter="true">
</rotate>
To modify the speed of the animation you can edit the android:duration parameter (in milliseconds).
USAGE:
Using an Animation file is simple :
Just place the required xml files inside res/anim/ folder.
And call the required animation by using R.anim.animation_name
For example, to add a transition while calling an activity, You can use overridePendingTransition(R.anim.fadein,R.anim.fadeout);
DOWNLOADING THE ANIMATION RESOURCES:
You can either manually copy the required xml file's content from above (or) You can also download the entire package that i have attached along with this thread. (or) You can click this link and download it.
More animations will be added in future ! :good:
Click to expand...
Click to collapse
ItaS said:
Hey,
Im developing my first android app too and I find it hard to deal with the graphics, is there any site that sells such ready to use graphics?
I saw that I can buy some at binpress.com and also at crowdi.me, does anyone know these sites and/or can recommened more tools?
Thanks,
ItaS
Click to expand...
Click to collapse
I think if is off topic from OP. Should create a new thread instead, IMO.
Thanks...........
Sent from my GT-S6102 using xda app-developers app
niranjan94 said:
When i was making my first app, I wanted to add some Transitions for my Activities. But didn't know how to make the anim xml files. So , I searched Google Got some pretty simple animations that would be useful for any app developer.
appear.xml - make an it just *appear*
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="1"
android:fromAlpha="1.0"
android:toAlpha="1.0"/>
</set>
fadein.xml - make it slowly fade into view
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="300"
android:repeatCount="0" />
</set>
fadeout.xml - make it slowly fade out of view
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="300"
android:repeatCount="0" />
</set>
push_down_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="-100%p" android:toYDelta="0" android:duration="400"/>
</set>
push_down_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="400"/>
</set>
push_right_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-100%p" android:toXDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_left_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_left_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="-100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
push_right_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
push_up_in.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="300"/>
<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="300" />
</set>
push_up_out.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0" android:toYDelta="-100%p" android:duration="300"/>
<alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="300" />
</set>
rotation.xml
HTML:
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="-90"
android:pivotX="50%"
android:pivotY="50%"
android:duration="0" android:fillAfter="true">
</rotate>
To modify the speed of the animation you can edit the android:duration parameter (in milliseconds).
USAGE:
Using an Animation file is simple :
Just place the required xml files inside res/anim/ folder.
And call the required animation by using R.anim.animation_name
For example, to add a transition while calling an activity, You can use overridePendingTransition(R.anim.fadein,R.anim.fadeout);
DOWNLOADING THE ANIMATION RESOURCES:
You can either manually copy the required xml file's content from above (or) You can also download the entire package that i have attached along with this thread. (or) You can click this link and download it.
More animations will be added in future ! :good:
Click to expand...
Click to collapse
@ niranjan94 hi i did not know where to ask this as i have searched a lot but could not find anything i am making a custom ROM and all is well except for one single problem i am trying to put a series of custom animation in my framework-res anim folder i know there are a lot of animation .xml files out there but i want to make my custom animation for example i like to put the bounce animation for dialog but flip animation for the activity changer the only way i know how to do this is to decompile,edit,recompile and flash the framework-res files for the hundreth time is there any way to test the xml file animation on computer?? please help i am going mad testing and flashing each animation framework
thanks
wow this is good
good job broo

[DEV]How to replace navbar icons on stock ROMs [SOLVED!]

I start this thread in order to share with you the information I already collected regarding the theming the navbar keys on stock roms. You should have realized that after Lollipop upgrade there is not even one stock based ROM or theme which contains themed navbar icons. The reason for this is:
1. Apktool RC3 is buggy on LG system apps, including LGSystemUI.apk. There is no way recently to decompile systemui and have access to the source code of the navbars.
2. With the Lollipop upgrade LG changed its approach regarding definition of the navbar icons using Google's new public classes of VectorDrawables.
Code:
java.lang.Object
↳android.graphics.drawable.Drawable
↳android.graphics.drawable.VectorDrawable
VectorDrawables are specific xml files that define vector graphics via vector coordinates.
The three main navbar icons are defined in LGSystemUI.apk as follows:
ic_sysbar_back_button.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="42.0dip" android:width="42.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M124.125,120.827h-76c-1.358,0-2.667-1.789-2.667-4c0-2.209,1.273-4,2.667-4h76c11.045,0,20-8.953,20-20 c0-11.046-8.955-19.999-20-19.999h-96v-8h96c15.463,0,28,12.535,28,27.999C152.125,108.292,139.588,120.827,124.125,120.827z" />
<path android:fillColor="#ffffffff" android:pathData="M45.447,54.302L30.36,66.189c0,0-1.581,1.291-0.553,2.639c-1.028,1.346,0.553,2.639,0.553,2.639 l15.086,11.886c0,0,3.054,2.04,0,5.447c-2.114,2.359-4.366,1.172-5.865,0L17.741,71.466c-1.291-1.074-1.616-2.639-1.616-2.639 s0.326-1.564,1.616-2.639l21.842-17.334c1.499-1.172,3.75-2.359,5.865,0C48.5,52.263,45.447,54.302,45.447,54.302z" />
</vector>
ic_sysbar_home_button.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="48.0dip" android:width="48.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M159.881,87.102l-0.541,1.217c-0.898,2.02-3.264,2.927-5.281,2.027L144.5,86.09c0,14.906,0,28.396,0,28.396 c0,2.209-1.791,4-4,4h-112c-2.209,0-4-1.791-4-4V86.09l-9.559,4.256c-2.018,0.898-4.382-0.009-5.281-2.027l-0.542-1.217 c-0.898-2.02,0.009-4.384,2.027-5.282l70.647-31.455c0.889-0.395,1.839-0.423,2.708-0.178c0.868-0.245,1.818-0.217,2.708,0.178 l70.647,31.455C159.873,82.718,160.781,85.082,159.881,87.102z M32.5,109.154c0,1.27,0.038,1.332,1.333,1.332h101.333 c1.244,0,1.334-0.047,1.334-1.332V82.528l-52-23.152l-52,23.152C32.5,95.766,32.5,109.154,32.5,109.154z" />
</vector>
ic_sysbar_recent_button.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="42.0dip" android:width="42.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M149,51.5H37c-2.209,0-5,1.027-5,3.236c0,0,0,5.764,0,10.764H21c-2.209,0-5,1.027-5,3.236v42.998 c0,2.211,2.791,4.766,5,4.766h112c2.209,0,3-2.555,3-4.766V101.5c8,0,13,0,13,0c2.209,0,3-2.555,3-4.766V54.736 C152,52.527,151.209,51.5,149,51.5z M128,106.402c0,1.285,0.91,2.098-0.333,2.098H26.333c-1.296,0-2.333-0.828-2.333-2.098V74.068 c0-1.27,1.038-0.568,2.333-0.568h101.333c1.243,0,0.333-0.716,0.333,0.568L128,106.402L128,106.402z M144,91.402 c0,1.285,0.91,2.098-0.333,2.098H136V68.736c0-2.209-0.791-3.236-3-3.236H40v-5.432c0-1.269,1.038-0.568,2.333-0.568h101.334 c1.243,0,0.333-0.716,0.333,0.568V91.402L144,91.402z" />
</vector>
I spent many dozen hours on finding/creating vector graphics of Lollipop navbar keys as SVG files. I tried many times and many ways to save the corresponding SVG files and convert them to VectorDrawable using this site: http://inloop.github.io/svg2android/
Used a trick to recompile the new xmls and replaced them in the LGSystemUI.apk with my vrtheme engine. But still no success. When the shape of the icon was OK the size of them was never.
Basically I am fully confused why the virtual canvas of the stock icons is 168x168. I am struggling with the fill and stroke color definition as well.
This is the status quo. I hope by starting this thread that together we can solve the problem and get the working source code of the Lollipop navbars. I look forward for any help.
Please note that skin1980 is already involved in the project and I got from him huge help with his intelligent hints.
This is a development thread please do not post comments and remarks that are not intended to provide professional help.
Merry Xmas to all of you!
Vector codes
REAL SOLUTION
Since the release of 20H software version LG also introduced the Lollipop navbar icons. These are defined in LGSystemUI.apk res/drawables folder by xml files [email protected]_button.xml where @ is the corresponding function name (for example ic_sysbar_back_button.xml.
{
"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"
}
Back button:
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M122.132,132c-0.921,0-1.759-0.324-2.435-0.847L44.916,87.979c-0.965-0.499-1.956-0.894-2.525-1.88c-0.338-0.586-0.492-1.221-0.516-1.852c-0.007-0.082-0.004-0.165-0.007-0.247c0.003-0.082,0-0.165,0.007-0.247c0.023-0.632,0.178-1.266,0.516-1.852c0.569-0.987,1.623-1.35,2.525-1.88l74.781-43.175c0.676-0.523,1.514-0.847,2.435-0.847c2.209,0,4,1.791,4,4v88C126.132,130.209,124.341,132,122.132,132zM54.025,84l64.106,37.012V46.988L54.025,84z" />
</vector>
Dual window
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M120,36H48c-6.627,0-12,5.373-12,12v72c0,6.627,5.373,12,12,12h72c6.627,0,12-5.373,12-12V48C132,41.373,126.627,36,120,36zM124,120c0,2.209-1.791,4-4,4H48c-2.209,0-4-1.791-4-4V88h80V120zM124,80H44V48c0-2.209,1.791-4,4-4h72c2.209,0,4,1.791,4,4V80z" />
<path android:fillColor="#ffffffff" android:pathData="M85.871,73.958h-4.795V55.041H76.23v-3.065l9.641-2.01V73.958z" />
<path android:fillColor="#ffffffff" android:pathData="M92.177,118.375h-16.38v-3.147l7.762-8.322c1.143-1.307,1.944-2.395,2.406-3.263c0.461-0.868,0.691-1.687,0.691-2.455c0-1.033-0.267-1.865-0.799-2.497c-0.533-0.632-1.31-0.947-2.332-0.947c-1.131,0-1.979,0.371-2.545,1.112c-0.566,0.741-0.85,1.75-0.85,3.023h-4.812c0-2.252,0.73-4.122,2.192-5.61c1.461-1.489,3.465-2.233,6.014-2.233c2.516,0,4.469,0.632,5.858,1.896s2.085,2.988,2.085,5.174c0,1.473-0.388,2.808-1.162,4.005s-2.101,2.807-3.979,4.828l-4.351,4.746h10.2V118.375z" />
</vector>
Home button
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M84,131.916c-26.464,0-47.917-21.453-47.917-47.916c0-26.463,21.453-47.917,47.917-47.917S131.917,57.537,131.917,84C131.917,110.465,110.463,131.916,84,131.916zM84,44.333c-21.908,0-39.667,17.76-39.667,39.667c0,21.908,17.76,39.667,39.667,39.667s39.667-17.76,39.667-39.667C123.667,62.093,105.908,44.333,84,44.333z" />
</vector>
Menu button
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M40,54h88c2.209,0,4-1.791,4-4s-1.791-4-4-4H40c-2.209,0-4,1.791-4,4S37.791,54,40,54zM128,80H40c-2.209,0-4,1.791-4,4s1.791,4,4,4h88c2.209,0,4-1.791,4-4S130.209,80,128,80zM128,114H40c-2.209,0-4,1.791-4,4s1.791,4,4,4h88c2.209,0,4-1.791,4-4S130.209,114,128,114z" />
</vector>
Notification down
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M123,44.179H45c-2.209,0-4-1.791-4-4s1.791-4,4-4h78c2.209,0,4,1.791,4,4S125.209,44.179,123,44.179zM51.181,90.828L79,118.647V58.379c0-2.209,1.791-4,4-4s4,1.791,4,4v60.557l28.025-28.026c1.563-1.562,4.096-1.562,5.656,0c1.563,1.563,1.563,4.096,0,5.658L86.59,130.66c-1.018,1.018-2.445,1.359-3.75,1.052c-1.151,0.114-2.342-0.253-3.224-1.134L45.524,96.486c-1.562-1.563-1.562-4.096,0-5.658C47.086,89.267,49.619,89.267,51.181,90.828z" />
</vector>
Notification up
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M123,131.82H45c-2.209,0-4-1.791-4-4s1.791-4,4-4h78c2.209,0,4,1.791,4,4S125.209,131.82,123,131.82zM115.025,77.09L87,49.064v60.556c0,2.209-1.791,4-4,4s-4-1.791-4-4V49.354L51.181,77.172c-1.562,1.563-4.095,1.563-5.657,0c-1.562-1.562-1.562-4.095,0-5.657l34.092-34.092c0.882-0.882,2.073-1.248,3.224-1.134c1.305-0.309,2.733,0.034,3.75,1.052l34.092,34.092c1.563,1.562,1.563,4.095,0,5.657C119.121,78.652,116.588,78.652,115.025,77.09z" />
</vector>
Qmemo button
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M87.637,123.2c-19.2,0-43.168,0-43.168,0c-5.523,0-10-4.478-10-10v-66c0-5.523,4.477-10,10-10h66c5.522,0,10,4.477,10,10c0,0,0,23.578,0,42.833c0,7.74-0.167,1.55-0.167,3.667c0,2.116-1.716,3.833-3.833,3.833s-3.832-1.717-3.832-3.833c0-2.117-0.168,1.901-0.168-3.5c0-16.292,0-39,0-39c0-3.313-2.687-6-6-6h-58c-3.313,0-6,2.687-6,6v58c0,3.313,2.688,6,6,6c0,0,22.708,0,39,0c5.402,0-0.117,0.237,2,0.237s3.833,1.717,3.833,3.834s-1.716,3.834-3.833,3.834S95.198,123.2,87.637,123.2z" />
<path android:fillColor="#ffffffff" android:pathData="M102.559,110.938c-3.443-3.053-8.367-8.672-10.938-12.484l-2.563-3.801c-2.572-3.813-1.324-5.215,2.772-3.113l4.082,2.094c4.098,2.102,10.269,6.319,13.711,9.372l22.323,18.669c1.951,1.73,2.128,4.713,0.395,6.661l-0.783,0.881c-1.734,1.947-4.723,2.124-6.675,0.394L102.559,110.938z" />
</vector>
Qslide button
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M98,74h26c2.209,0,4-1.791,4-4s-1.791-4-4-4h-16.302l19.515-19.515c1.563-1.562,1.563-4.095,0-5.657c-1.563-1.563-4.095-1.563-5.656,0L102,60.385V44c0-2.209-1.791-4-4-4s-4,1.791-4,4v26C94,72.209,95.791,74,98,74z" />
<path android:fillColor="#ffffffff" android:pathData="M70,94H44c-2.209,0-4,1.791-4,4s1.791,4,4,4h16.301l-19.515,19.516c-1.562,1.563-1.562,4.094,0,5.656c1.563,1.563,4.095,1.563,5.657,0L66,107.615V124c0,2.209,1.791,4,4,4s4-1.791,4-4V98C74,95.791,72.209,94,70,94z" />
<path android:fillColor="#ffffffff" android:pathData="M107.698,102H124c2.209,0,4-1.791,4-4s-1.791-4-4-4H98c-2.209,0-4,1.791-4,4v26c0,2.209,1.791,4,4,4s4-1.791,4-4v-16.385l19.557,19.557c1.563,1.563,4.096,1.563,5.656,0c1.563-1.563,1.563-4.095,0-5.656L107.698,102z" />
<path android:fillColor="#ffffffff" android:pathData="M70,40c-2.209,0-4,1.791-4,4v16.385L46.443,40.829c-1.562-1.563-4.094-1.563-5.657,0c-1.562,1.562-1.562,4.095,0,5.657L60.301,66H44c-2.209,0-4,1.791-4,4s1.791,4,4,4h26c2.209,0,4-1.791,4-4V44C74,41.791,72.209,40,70,40z" />
</vector>
Recent button
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M128.041,36.042H39.958c-2.209,0-4,1.791-4,4v87.917c0,2.209,1.791,4,4,4h88.083c2.211,0,4-1.791,4-4V40.042C132.041,37.833,130.252,36.042,128.041,36.042zM123.791,123.041c0,0.553-0.447,1-1,1H44.792c-0.553,0-1-0.447-1-1v-78c0-0.552,0.447-1,1-1h77.999c0.553,0,1,0.448,1,1V123.041z" />
</vector>
Simswitch button
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="34.0dip" android:width="34.0dip" android:viewportWidth="168.0" android:viewportHeight="168.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffffff" android:pathData="M137.348,121.033h-54.71c-2.569,0-4.653-2.09-4.653-4.668V94.984h-14.7l3.836,3.852c1.558,1.563,1.558,4.096,0,5.656c-0.779,0.781-1.799,1.172-2.82,1.172s-2.042-0.391-2.82-1.172l-10.368-10.41c-1.558-1.563-1.558-4.094,0-5.654l10.369-10.406c1.558-1.563,4.082-1.563,5.64,0c1.558,1.562,1.558,4.095,0,5.656l-3.272,3.285h17.501c2.569,0,4.653,2.09,4.653,4.666v21.352h48.004V67.817l-14.582-12.892H91.881c-2.57,0-4.279-1.465-4.279-4.042c0-2.577,1.709-3.917,4.279-3.917h28.49c1.135,0,2.229,0.416,3.078,1.167l16.979,15.08c1,0.885,1.572,2.16,1.572,3.499v49.653C142,118.943,139.918,121.033,137.348,121.033zM89.988,66.711v6.292h14.457l-3.563-3.576c-1.559-1.561-1.559-4.095,0-5.656c1.559-1.563,4.082-1.563,5.641,0l10.367,10.405c1.559,1.562,1.559,4.094,0,5.656L106.523,90.24c-0.777,0.781-1.801,1.172-2.82,1.172s-2.041-0.391-2.818-1.172c-1.559-1.563-1.559-4.094,0-5.656l3.662-3.677H86.654c-2.569,0-4.653-2.09-4.653-4.667v-8.509L67.605,54.963H33.993v58.017h31.566c2.569,0,4.153,1.434,4.153,4.01s-1.584,4.012-4.153,4.012H30.653c-2.569,0-4.653-2.09-4.653-4.668V51.633c0-2.577,2.083-4.667,4.653-4.667h37.644c1.133,0,2.228,0.416,3.078,1.167l17.04,15.08C89.414,64.098,89.988,65.373,89.988,66.711z" />
</vector>
For all button there is a different code for the transparent version. The above codes are already modified by me because the stock buttons are way too big. See here.
The button size is defined by vector android:height="42.0dip" android:width="42.0dip" and I decreased those values for my Lollipop theme.
In ChupaChups 4.1 you will be able to reduce the navigation bar height which requires the change of the corresponding button height as well.
I hope I helped. Good work with this icons.
Missing codes fixed. We need a proper pathdata for the lollipop icons and the right size definitions.
one might try to rebuild a customized in another lgsystemui with new icons and put them with full apk buttons.
I try this but I'm a little confused. buttons you create are not the photo. I still investigating
forgiveness. My English is the translator of google.
se podria intentar recompilar unos botones customizados en otro lgsystemui con iconos nuevos y meterlos con la apk completa.
yo intente hacer esto pero estoy un poco confuso. los botones que cree no son los de la foto. sigo investigando..
perdon. mi ingles es del traductor de google.
forgive my English.
first.
decompile a LGSystemUI.apk ok kitkat and open ic_sysbar_back.xml
second
decompile framework of kitkat and open values/public
third
decompile framework-res.apk of lollipop and open values/public
ok. ready.
first wanted png that android not use. for example "ic_jog_dial_answer". now, Go to values of lollipop and wanted id public and copy your id. Wanted on public of kitkat and copy your drawable.
Code:
<public type="drawable" name="ic_jog_dial_answer"[COLOR="Red"] id="0x01080371[/COLOR]" />
on lollipop
Code:
<public type="drawable" name="[COLOR="lime"]ic_perm_group_bluetooth[/COLOR]" [COLOR="red"]id="0x0108037[/COLOR]1" />
on kitkat
ok now go to ic_sysbar_back and replace your drawable
Code:
<item android:state_enabled="true" android:state_pressed="false" android:drawable="@[COLOR="Cyan"]*android:[/COLOR]drawable/[COLOR="Lime"]ic_perm_group_bluetooth[/COLOR]" />
<item android:state_enabled="true" android:state_pressed="true" android:drawable="@*android:drawable/ic_perm_group_bookmarks" />
<item android:drawable="@*android:drawable/ic_perm_group_bookmarks" />
</selector>
now recompile your systemui of kitkat and replace ic_sysbar_back on LGsystemUI.apk of lollipop
replace ic_jog_dial_answer.png for your png with this name and copy into framework-res.apk.
now put LGSystemUI.apk into your phone with root explorer and permission.
flash framework-res.apk with the new icons and voila
View attachment 3090021View attachment 3090024
if you want a tutorial in spanish ask to me:good:
edit. if you want test. here have my work.
first put lgsystemui.apk with root explorer and permision
after flash zip keytest.zip
http://www.mediafire.com/download/rabr0kmwv2l8g5g/LGSystemUI.apk
http://www.mediafire.com/download/oeyr76k15vbyye9/keys-test.zip
enjoy
ffalete said:
forgive my English.
first.
decompile a LGSystemUI.apk ok kitkat and open ic_sysbar_back.xml
second
decompile framework of kitkat and open values/public
third
decompile framework-res.apk of lollipop and open values/public
ok. ready.
first wanted png that android not use. for example "ic_jog_dial_answer". now, Go to values of lollipop and wanted id public and copy your id. Wanted on public of kitkat and copy your drawable.
Code:
<public type="drawable" name="ic_jog_dial_answer"[COLOR="Red"] id="0x01080371[/COLOR]" />
on lollipop
Code:
<public type="drawable" name="[COLOR="lime"]ic_perm_group_bluetooth[/COLOR]" [COLOR="red"]id="0x0108037[/COLOR]1" />
on kitkat
ok now go to ic_sysbar_back and replace your drawable
Code:
<item android:state_enabled="true" android:state_pressed="false" android:drawable="@[COLOR="Cyan"]*android:[/COLOR]drawable/[COLOR="Lime"]ic_perm_group_bluetooth[/COLOR]" />
<item android:state_enabled="true" android:state_pressed="true" android:drawable="@*android:drawable/ic_perm_group_bookmarks" />
<item android:drawable="@*android:drawable/ic_perm_group_bookmarks" />
</selector>
now recompile your systemui of kitkat and replace ic_sysbar_back on LGsystemUI.apk of lollipop
replace ic_jog_dial_answer.png for your png with this name and copy into framework-res.apk.
now put LGSystemUI.apk into your phone with root explorer and permission.
flash framework-res.apk with the new icons and voila
View attachment 3090021View attachment 3090024
if you want a tutorial in spanish ask to me:good:
View attachment 3090234View attachment 3090235
edit. if you want test. here have my work.
first put lgsystemui.apk with root explorer and permision
after flash zip keytest.zip
http://www.mediafire.com/download/rabr0kmwv2l8g5g/LGSystemUI.apk
http://www.mediafire.com/download/oeyr76k15vbyye9/keys-test.zip
enjoy
Click to expand...
Click to collapse
Many thanks ffalete. I followed your guide but got the following result:
I am confused with the following steps:
1. When changing the reference in ic_sysbar_(...).xml you said
Code:
android:drawable="@*android:drawable/ic_perm_group_bookmarks" />
I used:
Code:
android:drawable="@drawable/ic_perm_group_bookmarks" />
The * is not required, isn't it?
The navbar icons are 128X128. I put them into the xhdpi folder of framework-res.apk with the name "ic_perm_group_bookmarks".
What am I doing wrong? I had the same problems before the system loads different icons.
Do you know how to change the keys in the appdrawer?
*android: is requiered because this command is for framework.
if you do not put the framework will read
ffalete said:
*android: is requiered because this command is for framework.
if you do not put the framework will read
Click to expand...
Click to collapse
here you have the mod whith your vrtheme.
open the zip and decompile the xml of lgsystemui for compare.:good:
the vrtheme is funtional. you can flash on your phone
Great job! It works. Next step is to make the navbar transparent.
That is already more complicated jejejejeje.
For now we have to settle for this. you know
:laugh::laugh:
ffalete said:
That is already more complicated jejejejeje.
For now we have to settle for this. you know
:laugh::laugh:
Click to expand...
Click to collapse
Can you add up / down buttons and menu?
Here you have[emoji1]
http://www.mediafire.com/download/428x3w987mne9ck/test_navvar2.zip
ffalete said:
Here you have[emoji1]
http://www.mediafire.com/download/428x3w987mne9ck/test_navvar2.zip
Click to expand...
Click to collapse
Can you, please, NavBar botton "Menu" to activate?
According to your instructions, I did not get
There is no need for menu button just longpress recent button.
Is theres a way to resize the Navigation Bar Icons on Lollipop Custom ROM (AHD9.1) its way too big for my liking.
Sent from my LG-D855 using XDA Premium 4 mobile app
jeffzmagboo said:
Is theres a way to resize the Navigation Bar Icons on Lollipop Custom ROM (AHD9.1) its way too big for my liking.
Sent from my LG-D855 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Yes, use ChupaChups4.
OP updated with useful information.
thanks for share my friend just a small question on post 2 why back buttom have different size from the rest?
hugs !
Crash said:
thanks for share my friend just a small question on post 2 why back buttom have different size from the rest?
hugs !
Click to expand...
Click to collapse
Hey, my mistake, fixed.
Kickoff said:
Hey, my mistake, fixed.
Click to expand...
Click to collapse
Don´t worry jus one more question hehe sorry for disturb theres two files for example
ic_sysbar_back_button and ic_sysbar_back_button_trans do we have to change the size on both files or just in the file without the "transparent" ?
Hugs my friend
Both

[Guide][CM11] Make List Selector like Android L

Hi again guys :laugh:
on this occasion, i want share how to make click/tap like android L,
I am coming from this guide thread http://forum.xda-developers.com/showpost.php?p=60224248&postcount=1
big thanks to the author Gabri™
but I got an error while following step guide , then I think , it is a guide for stock TouchWiz .. and I tried to change a little in order to be able to work well in CM11
This guide is very simply
ok lets go..
Decompile framework-res.apk
Open framework-res.apk/res/drawable/list_selector_background_transition_holo_dark.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<transition
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/list_pressed_holo_dark" />
<item android:drawable="@drawable/list_longpressed_holo_dark" />
</transition>
Replace all lines with this:
Code:
[COLOR="Red"]<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_000" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_001" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_002" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_003" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_004" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_005" />
</animation-list>[/COLOR]
Save
Open framework-res.apk/res/drawable/list_selector_background_transition_holo_light.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<transition
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/list_pressed_holo_light" />
<item android:drawable="@drawable/list_longpressed_holo_light" />
</transition>
Replace all lines with this:
Code:
[COLOR="Red"]<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_000" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_001" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_002" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_003" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_004" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_005" />
</animation-list>[/COLOR]
Save
Then, download attached file and merge it to your decompiled framework-res.apk (framework-res.apk/res/drawable-xxhdpi/here)
Recompile ,,
Done
enjoyyy
A video tutorial would be great.....
qoejohn said:
Hi again guys :laugh:
on this occasion, i want share how to make click/tap like android L,
I am coming from this guide thread http://forum.xda-developers.com/showpost.php?p=60224248&postcount=1
big thanks to the author Gabri™
but I got an error while following step guide , then I think , it is a guide for stock TouchWiz .. and I tried to change a little in order to be able to work well in CM11
This guide is very simply
ok lets go..
Decompile framework-res.apk
Open framework-res.apk/res/drawable/list_selector_background_transition_holo_dark.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<transition
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/list_pressed_holo_dark" />
<item android:drawable="@drawable/list_longpressed_holo_dark" />
</transition>
Replace all lines with this:
Code:
[COLOR="Red"]<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_000" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_001" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_002" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_003" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_004" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_dark_005" />
</animation-list>[/COLOR]
Save
Open framework-res.apk/res/drawable/list_selector_background_transition_holo_light.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<transition
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/list_pressed_holo_light" />
<item android:drawable="@drawable/list_longpressed_holo_light" />
</transition>
Replace all lines with this:
Code:
[COLOR="Red"]<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_000" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_001" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_002" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_003" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_004" />
<item android:duration="1" android:drawable="@drawable/list_anim_holo_light_005" />
</animation-list>[/COLOR]
Save
Then, download attached file and merge it to your decompiled framework-res.apk (framework-res.apk/res/drawable-xxhdpi/here)
Recompile ,,
Done
enjoyyy
Click to expand...
Click to collapse
amazing thanks bro ... now if it works .. thanks..
Casper1982 said:
amazing thanks bro ... now if it works .. thanks..
Click to expand...
Click to collapse
well broo :good:

G4 tweaksbox - lockscreen themes/animations not working correctly? (Solved)

So i've been tinkering with themes for the G4 tweaksbox and i've found that resources on the lockscreen (for example, the slide-for-camera icon) are changed with the system ui theme and not the lockscreen theme - is this because the tweaksbox was originally made for KitKat on the G3 and the lockscreen was fundamentally changed with lollipop and is now pretty much a part of the systemui?
Anyway, i've made some new resources and added the correct strings to theme.xml and lockscreen-theme.xml (which turned out to be not needed) along with a animation file for them in /drawable, but i can't get the custom animation to work. I've created the file lockscreen_lock_icon_camera_animation.xml (found by decompiling the systemui.apk on my G4) and pretty much used other g4twb animation files as a template to write this in it: (The xmlns link does not have breaks in it, i put them in here because xda wont let new users post links)
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="true"
xmlns:android="http :// schemas . android . com / apk / res / android">
<item android:duration="1300" android:drawable="@drawable/lockscreen_lock_icon_camera_00" />
<item android:duration="100" android:drawable="@drawable/lockscreen_lock_icon_camera_01" />
<item android:duration="100" android:drawable="@drawable/lockscreen_lock_icon_camera_02" />
<item android:duration="800" android:drawable="@drawable/lockscreen_lock_icon_camera_03" />
<item android:duration="300" android:drawable="@drawable/lockscreen_lock_icon_camera_00" />
<item android:duration="100" android:drawable="@drawable/lockscreen_lock_icon_camera_01" />
<item android:duration="100" android:drawable="@drawable/lockscreen_lock_icon_camera_02" />
<item android:duration="800" android:drawable="@drawable/lockscreen_lock_icon_camera_03" />
<item android:duration="300" android:drawable="@drawable/lockscreen_lock_icon_camera_00" />
</animation-list>
All the files compile fine and can be found in the newly generated public.xml file but only the new resources show, not the new animation. Any ideas why?
EDIT:
Looked through my files again and turns out i forgot to add the animation file to theme.xml.
Can't find a delete button anywhere so i guess you are all free to laugh at me now

Categories

Resources