Changing Status Bar Color - ICS - Samsung Galaxy R i9103

Hi,
I'm trying to change the status bar clock color in the Glide ICS leak. I decompile SystemUI.apk, navigate to /res/values/styles.xml and change to:
Code:
<style name="TextAppearance.StatusBar.Clock" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ff33b5e5</item>
</style>
<style name="TextAppearance.StatusBar.Date" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#ff33b5e5</item>
Recompiling, deleting resources.arsc in keep folder and replacing the the resources from the new apk to the old apk, I flash the systemui.apk and the status bar clock stays the same color...The strange thing is before this the lines of code above were already like android_holo_blue or whatever.
Help? Thanks!

Aquethys said:
Hi,
I'm trying to change the status bar clock color in the Glide ICS leak. I decompile SystemUI.apk, navigate to /res/values/styles.xml and change to:
!
Click to expand...
Click to collapse
Buddy. Do not make the changes in styles.xml. Open Status_bar.xml from res/drawable-hdpi/layout. In that search for "com.android.systemui.statusbar.Clock". In that line, at the end add
Code:
android:textColor="#ff33b5e5"
.
Similarly do it for date too by searching for the line "com.android.systemui.statusbar.DateView" and add the same line at the end of that code.
Recompile and follow the rest of procedure.

Didn't do anything: Here's what the line of code is
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:textColor="#ff33b5e5" />
Do I need to change date too? Where is that?

bump

Aquethys said:
Didn't do anything: Here's what the line of code is
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:textColor="#ff33b5e5" />
Do I need to change date too? Where is that?
Click to expand...
Click to collapse
Sorry for late reply buddy. Yeah..tats right. Do that for date too. Find "com.android.systemui.statusbar.DateView" and make a similar change in that.

Hm date doesn't seem to be in there. Our statusbar xml is in res\layout...
Uploaded here

bump

Related

1% battery steps

The trick actually comes from Defy devs and I tested it before on Milestone, but unsuccessfully at that time.
normal battery capacity reading is done using
/sys/class/power_supply/battery/capacity - which is in 10% steps
On some Motorola phones, there's also
/sys/class/power_supply/battery/charge_counter - that is in 1% steps.
But on Milestone, the charge_counter is always 0.
Unless you use /system/bin/battd from Milestone 2 or Droid 2 (or possibly other phone as well)
See (origin - Defy)
https://github.com/Quarx2k/android_...ni/com_android_server_BatteryService.cpp#L301
Btw., in CM7 I've decided to use battd from the leaked Droid2 gingerbread firmware, as that is the most recent (and the only 2.3) motorola's build for phone with similar HW as Milestone that I'm aware of.
Current implementation in CM7 for Milestone (optional, using persist.sys.one_percent_batt property):
https://github.com/nadlabak/android_frameworks_base/commit/b912685321b67b4d2b145e6f17fd6bc3cedf4e45
https://github.com/nadlabak/android...mmit/113eb4200fd3c9237ce5d9c4aa9df2778aa55e97
https://github.com/nadlabak/android...mmit/32efe6e51ea1666222cf082075d6683d2b6fc791
https://github.com/nadlabak/android...mmit/b709ad1e344959529db158d48cf10b8faaa8955a
Please note that Droid 2 / Milestone 2 is more strict when it comes to third party batteries.
So this feature may cause issues when third party batteries are used.
There may also be problems with some third party AC adapters that are not able to provide stable 5V when charging.
sounds good btw, any tut how to do it on any 2.3 rom?
or just replace battd from mileston2 rom (or your last cm7) and it will work? or...?
It's certainly not limited to 2.3 ROMs.
But frameworks/base/services/jni/com_android_server_BatteryService.cpp needs the above mentioned change.
kabaldan said:
It's certainly not limited to 2.3 ROMs.
Click to expand...
Click to collapse
Again, brilliant work Kabaldan!
The only feature I'm looking for now is the ability to use a SWAP partition in the micro SD.
@kab
I have compiled the framework using that commit, then used the battd and libbattd.so from CM7, but I still have 10% steps!
Any other changes I have to do?
salisbury_steak said:
Again, brilliant work Kabaldan!
The only feature I'm looking for now is the ability to use a SWAP partition in the micro SD.
Click to expand...
Click to collapse
I totally second that, but I don't think that that is ever going to happen though we should never underestimate the power of kabaldan
please can you finalise froyo kabaldan? so much good work going on since the last version. ive found your froyo to be the best on battery and performance/snappiness
deleted....
how can i make the rom i use right now showing one by one the battery percentage?? thank you.
I decompiled framework-res.apk, edit file stat_sys_battery lik this:
Code:
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="1" />
<item android:drawable="@drawable/stat_sys_battery_1" android:maxLevel="2" />
<item android:drawable="@drawable/stat_sys_battery_2" android:maxLevel="3" />
<item android:drawable="@drawable/stat_sys_battery_3" android:maxLevel="4" />
<item android:drawable="@drawable/stat_sys_battery_4" android:maxLevel="5" />
<item android:drawable="@drawable/stat_sys_battery_5" android:maxLevel="6" />
<item android:drawable="@drawable/stat_sys_battery_6" android:maxLevel="7" />
<item android:drawable="@drawable/stat_sys_battery_7" android:maxLevel="8" />
<item android:drawable="@drawable/stat_sys_battery_8" android:maxLevel="9" />
<item android:drawable="@drawable/stat_sys_battery_9" android:maxLevel="10" />
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="11" />
<item android:drawable="@drawable/stat_sys_battery_11" android:maxLevel="12" />
<item android:drawable="@drawable/stat_sys_battery_12" android:maxLevel="13" />
<item android:drawable="@drawable/stat_sys_battery_13" android:maxLevel="14" />
<item android:drawable="@drawable/stat_sys_battery_14" android:maxLevel="15" />
<item android:drawable="@drawable/stat_sys_battery_15" android:maxLevel="16" />
<item android:drawable="@drawable/stat_sys_battery_16" android:maxLevel="17" />
<item android:drawable="@drawable/stat_sys_battery_17" android:maxLevel="18" />
<item android:drawable="@drawable/stat_sys_battery_18" android:maxLevel="19" />
<item android:drawable="@drawable/stat_sys_battery_19" android:maxLevel="20" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="21" />
<item android:drawable="@drawable/stat_sys_battery_21" android:maxLevel="22" />
<item android:drawable="@drawable/stat_sys_battery_22" android:maxLevel="23" />
<item android:drawable="@drawable/stat_sys_battery_23" android:maxLevel="24" />
<item android:drawable="@drawable/stat_sys_battery_24" android:maxLevel="25" />
<item android:drawable="@drawable/stat_sys_battery_25" android:maxLevel="26" />
<item android:drawable="@drawable/stat_sys_battery_26" android:maxLevel="27" />
<item android:drawable="@drawable/stat_sys_battery_27" android:maxLevel="28" />
<item android:drawable="@drawable/stat_sys_battery_28" android:maxLevel="29" />
<item android:drawable="@drawable/stat_sys_battery_29" android:maxLevel="30" />
<item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="31" />
<item android:drawable="@drawable/stat_sys_battery_31" android:maxLevel="32" />
<item android:drawable="@drawable/stat_sys_battery_32" android:maxLevel="33" />
<item android:drawable="@drawable/stat_sys_battery_33" android:maxLevel="34" />
<item android:drawable="@drawable/stat_sys_battery_34" android:maxLevel="35" />
<item android:drawable="@drawable/stat_sys_battery_35" android:maxLevel="36" />
<item android:drawable="@drawable/stat_sys_battery_36" android:maxLevel="37" />
<item android:drawable="@drawable/stat_sys_battery_37" android:maxLevel="38" />
<item android:drawable="@drawable/stat_sys_battery_38" android:maxLevel="39" />
<item android:drawable="@drawable/stat_sys_battery_39" android:maxLevel="40" />
<item android:drawable="@drawable/stat_sys_battery_40" android:maxLevel="41" />
<item android:drawable="@drawable/stat_sys_battery_41" android:maxLevel="42" />
<item android:drawable="@drawable/stat_sys_battery_42" android:maxLevel="43" />
<item android:drawable="@drawable/stat_sys_battery_43" android:maxLevel="44" />
<item android:drawable="@drawable/stat_sys_battery_44" android:maxLevel="45" />
<item android:drawable="@drawable/stat_sys_battery_45" android:maxLevel="46" />
<item android:drawable="@drawable/stat_sys_battery_46" android:maxLevel="47" />
<item android:drawable="@drawable/stat_sys_battery_47" android:maxLevel="48" />
<item android:drawable="@drawable/stat_sys_battery_48" android:maxLevel="49" />
<item android:drawable="@drawable/stat_sys_battery_49" android:maxLevel="50" />
<item android:drawable="@drawable/stat_sys_battery_50" android:maxLevel="51" />
<item android:drawable="@drawable/stat_sys_battery_51" android:maxLevel="52" />
<item android:drawable="@drawable/stat_sys_battery_52" android:maxLevel="53" />
<item android:drawable="@drawable/stat_sys_battery_53" android:maxLevel="54" />
<item android:drawable="@drawable/stat_sys_battery_54" android:maxLevel="55" />
<item android:drawable="@drawable/stat_sys_battery_55" android:maxLevel="56" />
<item android:drawable="@drawable/stat_sys_battery_56" android:maxLevel="57" />
<item android:drawable="@drawable/stat_sys_battery_57" android:maxLevel="58" />
<item android:drawable="@drawable/stat_sys_battery_58" android:maxLevel="59" />
<item android:drawable="@drawable/stat_sys_battery_59" android:maxLevel="60" />
<item android:drawable="@drawable/stat_sys_battery_60" android:maxLevel="61" />
<item android:drawable="@drawable/stat_sys_battery_61" android:maxLevel="62" />
<item android:drawable="@drawable/stat_sys_battery_62" android:maxLevel="63" />
<item android:drawable="@drawable/stat_sys_battery_63" android:maxLevel="64" />
<item android:drawable="@drawable/stat_sys_battery_64" android:maxLevel="65" />
<item android:drawable="@drawable/stat_sys_battery_65" android:maxLevel="66" />
<item android:drawable="@drawable/stat_sys_battery_66" android:maxLevel="67" />
<item android:drawable="@drawable/stat_sys_battery_67" android:maxLevel="68" />
<item android:drawable="@drawable/stat_sys_battery_68" android:maxLevel="69" />
<item android:drawable="@drawable/stat_sys_battery_69" android:maxLevel="70" />
<item android:drawable="@drawable/stat_sys_battery_70" android:maxLevel="71" />
<item android:drawable="@drawable/stat_sys_battery_71" android:maxLevel="72" />
<item android:drawable="@drawable/stat_sys_battery_72" android:maxLevel="73" />
<item android:drawable="@drawable/stat_sys_battery_73" android:maxLevel="74" />
<item android:drawable="@drawable/stat_sys_battery_74" android:maxLevel="75" />
<item android:drawable="@drawable/stat_sys_battery_75" android:maxLevel="76" />
<item android:drawable="@drawable/stat_sys_battery_76" android:maxLevel="77" />
<item android:drawable="@drawable/stat_sys_battery_77" android:maxLevel="78" />
<item android:drawable="@drawable/stat_sys_battery_78" android:maxLevel="79" />
<item android:drawable="@drawable/stat_sys_battery_79" android:maxLevel="80" />
<item android:drawable="@drawable/stat_sys_battery_80" android:maxLevel="81" />
<item android:drawable="@drawable/stat_sys_battery_81" android:maxLevel="82" />
<item android:drawable="@drawable/stat_sys_battery_82" android:maxLevel="83" />
<item android:drawable="@drawable/stat_sys_battery_83" android:maxLevel="84" />
<item android:drawable="@drawable/stat_sys_battery_84" android:maxLevel="85" />
<item android:drawable="@drawable/stat_sys_battery_85" android:maxLevel="86" />
<item android:drawable="@drawable/stat_sys_battery_86" android:maxLevel="87" />
<item android:drawable="@drawable/stat_sys_battery_87" android:maxLevel="88" />
<item android:drawable="@drawable/stat_sys_battery_88" android:maxLevel="89" />
<item android:drawable="@drawable/stat_sys_battery_89" android:maxLevel="90" />
<item android:drawable="@drawable/stat_sys_battery_90" android:maxLevel="91" />
<item android:drawable="@drawable/stat_sys_battery_91" android:maxLevel="92" />
<item android:drawable="@drawable/stat_sys_battery_92" android:maxLevel="93" />
<item android:drawable="@drawable/stat_sys_battery_93" android:maxLevel="94" />
<item android:drawable="@drawable/stat_sys_battery_94" android:maxLevel="95" />
<item android:drawable="@drawable/stat_sys_battery_95" android:maxLevel="96" />
<item android:drawable="@drawable/stat_sys_battery_96" android:maxLevel="97" />
<item android:drawable="@drawable/stat_sys_battery_97" android:maxLevel="98" />
<item android:drawable="@drawable/stat_sys_battery_98" android:maxLevel="99" />
<item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="100" />
Then added png files battery level with % number into drawable-hdpi, rebuilt, reflashed, rebooted, when the fall started, it showed new battery icon with % number on statusbar, but a lot of app FC...
Did i do anything wrong?
keunhuvac said:
I decompiled framework-res.apk, edit file stat_sys_battery lik this:
Then added png files battery level with % number into drawable-hdpi, rebuilt, reflashed, rebooted, when the fall started, it showed new battery icon with % number on statusbar, but a lot of app FC...
Did i do anything wrong?
Click to expand...
Click to collapse
it's not that easy, dude.
as kabaldan wrote: you have to build frameworks/base/services/jni/com_android_server_BatteryService.cpp from sources!!! with the changes you find in github-link he posted + using the battd in /system/bin/ he used (from Droid2 od MS2)
eybee1970 said:
it's not that easy, dude.
as kabaldan wrote: you have to build frameworks/base/services/jni/com_android_server_BatteryService.cpp from sources!!! with the changes you find in github-link he posted + using the battd in /system/bin/ he used (from Droid2 od MS2)
Click to expand...
Click to collapse
So the method to display battery in step 1% is only available if i choose display % battery in statatusbar tweak (in cyanogenmod settings)?
Nope sileshn got it working on my Froyomod with all 100 battery icons!!
Ask him
keunhuvac said:
So the method to display battery in step 1% is only available if i choose display % battery in statatusbar tweak (in cyanogenmod settings)?
Click to expand...
Click to collapse
You need to change the resource ID's for all of the PNG's you are adding. Silesh said it was something like 89 extra PNG's for all 100 icons.
Where can I find him? I port MIUI to the droid from the Milestone build each week. I would like to port this to Droid as well.
TreyMotes said:
Where can I find him? I port MIUI to the droid from the Milestone build each week. I would like to port this to Droid as well.
Click to expand...
Click to collapse
You can send him a PM. He is always around here though, so he might also reply to this thread soon.
I just realized that it won't really matter. MIUI is closed source so building framework from source is impossible. I have passed this info to the Chinese developers in hopes that they will add this to the Milestone MIUI builds.
TreyMotes said:
I just realized that it won't really matter. MIUI is closed source so building framework from source is impossible. I have passed this info to the Chinese developers in hopes that they will add this to the Milestone MIUI builds.
Click to expand...
Click to collapse
Very true my friend. You will need to wait till miui cn include it in their releases. Then you can mod it to use extra png's.
It works perfectly on Froyomod.
Sent from my Milestone using Tapatalk
This saddens me. I really wanted to surprise the users of my port this morning. Oh well. We patiently wait I guess...
keunhuvac said:
So the method to display battery in step 1% is only available if i choose display % battery in statatusbar tweak (in cyanogenmod settings)?
Click to expand...
Click to collapse
Hey buddy, I can add the pngs to the framework of cm7 if you want me to. Just link me up to the icons you want to use.
Sent from my Milestone using Tapatalk

[TUT] Add rotation on your own to Netflix apps (and other apps)

This is just a simple tutorial about enabling screen rotation to apps that do not rotate automatically when you turn your device. It is really a TUT on how to open an apk and edit the androidmanifest.xml file. Pretty simple.
Easy:​
1. Decompile the Application.apk with apktool
2. Edit the androidmanifest with Notepad++
3. Build the Application.apk with apktool
4. Sign the apk with autosign.
Click to expand...
Click to collapse
Detailed:​
You will need some tools:
************************************************************
Android SDK: http://developer.android.com/sdk/index.html
APK Tool: http://code.google.com/p/android-apktool/
Notepad++: http://notepad-plus-plus.org/
A signing tool: Google "auto-sign apk"
An archiving tool: Plenty of them out there cable of .zip files
After you get this figured out, move on to step 1.
************************************************************
I do this from my desktop, so this is written as such.
Step 1. Decompile the Application.apk with apktool
___________________________________________________________
A. Open cmd.exe
B. Type apktool d C:/users/desktop/Netflix1.4.apk
(this refers to your desktop, so type the correct address for YOURS. However, I do not type, I drag and drop the Netflix.apk from my destop onto the cmd window)
C. Add a space then add destination directory "C:/users/destop/Netflixmod"
Again, your address of wherever you are working, and whetever you want to call the destination folder. For this I also drag and drop the same file, and just remove the .apk text.
D. Hit enter
Code:
apktool d C:\users\desktop\Netflix1.4.apk "C:\users\desktop\Netflixmod"
Your desktop address will be different than what I have typed, your Netflix app or whatever app you are decompiling will be different and your destination address and directory name will be different. DO NOT COPY PASTE THIS CODE INTO YOUR CMD LINE.
Click to expand...
Click to collapse
Step 2. Edit the androidmanifest with Notepad++
___________________________________________________________
This is for Netflix 1.4
In the folder that you just created on your desktop (or wherever you are working) There is a file called androidmanifest.xml
Open this file with Notepad++ and edit the following lines:
Change line 5: android:screenOrientation="portrait" to android:screenOrientation="sensor"
Change line 29: android:screenOrientation="landscape" to android:screenOrientation="sensor"
Save the file.
Click to expand...
Click to collapse
Step 3. Build the Application.apk with apktool
___________________________________________________________
Similar to decompiling:
A.
Code:
apktool b C:\users\desktop\Netflixmod
This will build the application in the same folder that you are working in (i.e. "Netflixmod" folder) You can specify a new directory if you want, but I do not.
There will now be a folder named "Build" within the "Netflixmod" folder.
B. Copy the "Assets" folder into the "build" folder. (apktool leaves this out, but it is important).
C. Zip the contents of the build folder into a .zip file called apk.zip. (do not zip the Build folder, just everything inside of it INCLUDING THE ASSETS FOLDER!)
D. Rename the apk.zip file to apk.apk file.
Click to expand...
Click to collapse
Step 4. Sign the apk with autosign.
___________________________________________________________
Well, sign the app with some signing tool that you are comfortable with.
Just google auto-sign apk, there are plenty of options. Cant find the link towhat I use. Please feel free to post an easy signing tool here if you want it added.
Click to expand...
Click to collapse
**************************************************
Here is all of the code that I changed in the Netflix1.4 app to enable rotation and fix graphic bugs.
You can copy paste this into a text editor like Notepad++ and save as /.xml files. Then replace the files in your decompiled app with these. Or you can download the text file attached and create separate files out of each section of code.
New Netflix 1.4 Updated 9/09/2011
BELOW ARE THE FILES THAT NEED TO BE EDITED TO ENABLE ROTATION AND AVOID GRAPHICS BUGS.
TO CHANGE COLOR, EDIT THE "#ffb9090b" TO ANOTHER HEX COLOR. IN ALL FILES EXCEPT FOR THE ANDROID MANIFEST.
───────────────────────────────────
Android Manifest.xml:
───────────────────────────────────
Change line 5: android:screenOrientation="portrait" to android:screenOrientation="sensor"
Change line 29: android:screenOrientation="landscape" to android:screenOrientation="sensor"
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="259" android:versionName="1.4.0 build 259" android:installLocation="auto" package="com.netflix.mediaclient"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:theme="@android:style/Theme.NoTitleBar" android:label="@string/app_name" android:icon="@drawable/icon" android:name=".NetflixApplication" android:debuggable="false">
<activity android:label="@string/app_name" android:name=".UIWebViewActivity" android:enabled="@bool/phone" android:finishOnTaskLaunch="false" android:clearTaskOnLaunch="true" android:launchMode="singleTop" android:screenOrientation="sensor" android:configChanges="keyboardHidden|orientation" android:alwaysRetainTaskState="true" android:allowTaskReparenting="true" android:windowSoftInputMode="stateVisible|adjustResize" android:noHistory="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="nflx" android:host="www.netflix.com" />
</intent-filter>
</activity>
<activity android:label="@string/app_name" android:name=".UIWebViewTabletActivity" android:enabled="@bool/tablet" android:finishOnTaskLaunch="false" android:clearTaskOnLaunch="true" android:launchMode="singleTop" android:configChanges="keyboardHidden|orientation" android:alwaysRetainTaskState="true" android:allowTaskReparenting="true" android:windowSoftInputMode="stateVisible|adjustResize" android:noHistory="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="nflx" android:host="www.netflix.com" />
</intent-filter>
</activity>
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:label="@string/app_name" android:name=".PlayerActivity" android:screenOrientation="sensor" android:configChanges="orientation" android:noHistory="false" />
</application>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.wifi" android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="11" />
</manifest
\res\layout folder
playout_splash.xml
───────────────────────────────────
<!--
Edited Line 4: android:layout_gravity="bottom|center" to android:layout_gravity="center"
removed android:layout_marginBottom="150.0dip"
Edited Line 5: android:layout_marginBottom="100.0dip" to android:layout_marginBottom="90.0dip"
Dblfstr
-->
Code:
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout android:orientation="vertical" android:id="@id/top_panel" android:background="#ffb9090b" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_gravity="center" android:id="@id/logo" android:visibility="visible" android:layout_width="202.0dip" android:layout_height="62.0dip" android:src="@drawable/logo_splash" />
<ProgressBar android:layout_gravity="bottom|center" android:id="@id/pb_loading" android:visibility="visible" android:layout_width="30.0dip" android:layout_height="30.0dip" android:layout_marginBottom="90.0dip" android:indeterminate="true" android:indeterminateOnly="true" android:soundEffectsEnabled="false" style="?android:progressBarStyleSmallInverse" />
<TextView android:textSize="14.0dip" android:textColor="#ffffffff" android:layout_gravity="bottom|center" android:id="@id/label_loading" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="50.0dip" android:text="@string/label_ps_loading" />
<!--
Edited Line 4: android:layout_gravity="bottom|center" to android:layout_gravity="center"
removed android:layout_marginBottom="150.0dip"
Edited Line 5: android:layout_marginBottom="100.0dip" to android:layout_marginBottom="90.0dip"
Dblfstr
-->
</FrameLayout>
\res\layout folder
ui_splash.xml
───────────────────────────────────
<!--
Edited Line 4: android:layout_gravity="bottom|center" to android:layout_gravity="center"
removed android:layout_marginBottom="150.0dip"
Edited Line 5: android:layout_width="wrap_content" android:layout_height="wrap_content" to android:layout_width="30.0dip" android:layout_height="30.0dip" and "android:layout_marginTop="80.0dip"
Dblfstr
-->
Code:
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout android:id="@id/FrameLayout" android:background="#ffb9090b" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_gravity="center" android:id="@id/logo" android:visibility="visible" android:layout_width="202.0dip" android:layout_height="62.0dip" android:src="@drawable/logo_splash" android:layout_centerInParent="true" />
<ProgressBar android:id="@id/ui_load" android:visibility="visible" android:layout_width="30.0dip" android:layout_height="30.0dip" android:layout_marginTop="80.0dip" android:indeterminate="true" android:indeterminateOnly="true" android:layout_below="@id/logo" android:layout_centerInParent="true" android:soundEffectsEnabled="false" />
<!--
Edited Line 4: android:layout_gravity="bottom|center" to android:layout_gravity="center"
removed android:layout_marginBottom="150.0dip"
Edited Line 5: android:layout_width="wrap_content" android:layout_height="wrap_content" to android:layout_width="30.0dip" android:layout_height="30.0dip" and "android:layout_marginTop="80.0dip"
Dblfstr
-->
</RelativeLayout>
\res\layout folder
webview.xml
───────────────────────────────────
<!--
Edited line 2; android:background hex values
-->
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/address" android:background="#ffb9090b" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="vertical" android:id="@id/go_button" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<WebView android:id="@id/ui" android:background="@drawable/splash" android:visibility="visible" android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</LinearLayout>
<!--
Edited line 2; android:background hex values
-->
</LinearLayout>
all of this code is found in the attached .txt file. Remember to save each bit of code as a separate file and replace in your Netflix.apk.
and i need this
should take this
for us NON programmers, anyway you (or someone else) can actually post a modified apk?
OK, so I tried to modify these .xml files... so far, I haven't been able to open them up successfully. So my noob-ish question is, "what editor do I use to open these up?" Standard XML editors found in Windows/Office doesn't show them right.
Or can I just replace the files altogether by copying and pasting the stuff in the post? ... I will try that first, I guess...
Update1:
So I extracted the files for editing, and then replaced all the lines in those files (which by the way, opened up to show some weird encoding) using Notepad++ ... I was able to replace all the stuff anyways, and I saved it. Re-packed the apk... Nothing changed. What am I missing??
Update 2:
I think my problem now is finding out how I can recompile the file and be able to either keep the signature or make a valid signature. I say this because now all I get when I try to install the modifed apk it says "error parsing file" or "... not signed correctly"
I give up! I tried and took a few shots at it, but I guess I am missing something. Oh well...
http://forum.xda-developers.com/showthread.php?p=17446113#post17446113
All Credit goes to Dblfstr!
Sent from A Van Down By The River!
Worked like a charm dblfstr. Thanks.
Whew, exactly what I needed. Thanks again. I guess I'LLC leave all the Modding stuff to the seasoned folks.
Simple tutorial added.
Suggestions welcome
Thanks
bklizard said:
OK, so I tried to modify these .xml files... so far, I haven't been able to open them up successfully. So my noob-ish question is, "what editor do I use to open these up?" Standard XML editors found in Windows/Office doesn't show them right.
Or can I just replace the files altogether by copying and pasting the stuff in the post? ... I will try that first, I guess...
Update1:
So I extracted the files for editing, and then replaced all the lines in those files (which by the way, opened up to show some weird encoding) using Notepad++ ... I was able to replace all the stuff anyways, and I saved it. Re-packed the apk... Nothing changed. What am I missing??
Update 2:
I think my problem now is finding out how I can recompile the file and be able to either keep the signature or make a valid signature. I say this because now all I get when I try to install the modifed apk it says "error parsing file" or "... not signed correctly"
I give up! I tried and took a few shots at it, but I guess I am missing something. Oh well...
Click to expand...
Click to collapse
Simple tutorial added that may assist you.
Yes, the app has to be decompiled before you can edit the .xml files.
You will need to build the app after you made your changes.
Then zip the app
then sign the app.
[APP][UPDATE][Netflix V1.4] Netflix Rotation Enabled Apps w/ Colored Loading Screens updated to Netflix 1.4 for those who do not want to attempt to add the rotation on your own.
Thanks
I saw this on the front page Congrats! I'm wondering if this was disable because there are several instances of tabbed views leaking activities when the orientation is changed. A good test would be to link up ddms to the app and repeatedly change the orientation and see if the memory gets eattin up.
Am I SOL if the screenOrientation="1" is in all the lines?
is it possible to to this with the touchwiz30 .apk?
WOW, made it to the portal. That is awesome. Hopefully someone can benefit from this thread.
Pacifik said:
Am I SOL if the screenOrientation="1" is in all the lines?
Click to expand...
Click to collapse
Not necessarily. To what app are you referring?
ChadBFlores said:
is it possible to to this with the touchwiz30 .apk?
Click to expand...
Click to collapse
Probably a little more difficult. Nothing is impossible, however.
Screen Orientation + High Resolution Support
Is it possible to do any of those steps directly on the device itself ? For those who don't have access to computers on a regular basis...
Also, would you know which property(ies) I would have to change to get an app to fill the whole screen instead of a small part surrounded by black bars ?
I'm referring to the Canadian Sirius Radio app... It used to render correctly on my Droid1/Milestone, but now with my Droid3/XT860, the screen resolution as changed and it doesn't seem to be "programmed" to support larger screen resolution (qHD).
If I can implement both fixes, yours and mine, I'll be a happy man !
Looks ok, but as a developer I can tell you that most apps will break because of faulty design. Setting stick orientation is a workaround for their lesser API knowledge used by many beginning developers. I did it myself, stopped doing that when I learned more. Most of hacked apps will experience memory leaks, some of them FCs.
Anyway idea is great

[MODz]Advanced Theming Mods Collection

{
"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"
}
DISCLAIMER NOTE: I AND XDA IS NOT TO BE HELD RESPONSIBLE FOR ANY DAMAGES THAT YOUR PHONE MIGHT INCUR DURING THIS PROCESS, I HAVE TESTED IT IN MY BEST KNOWLEDGE TO WORK FOR OUR DEVICE BUT JUST TO BE SURE, PLEASE PERFORM ALL NECESSARY BACKUPS FOR THE PHONE TO PREVENT ANY DATA LOSS, IF YOU HAVE THE NEED TO DISAGREE AND/OR FAIL TO COMPLY JUST DONT FLASH IT AND GET ON WITH YOUR LIVES
Click to expand...
Click to collapse
PLEASE RESPECT MY WORK, DO NOT UPLOAD THIS TO OTHER WEBSITES, P2P, FTP AND OTHER MEANS OF FILE TRANSFER WITHOUT MY CONSENT, ALSO IF U WANT TO INCLUDE THIS IN YOUR WORK/ DEVELOPMENT, OR IF YOU BASE YOUR WORK IN ANY OF MY FILES THAT IS CONTAINED WITHIN THE DATA PLEASE CREDIT ME AND LINK THE FILES HERE OR ELSE IMMEDIATE LEGAL/ARBITRARY ACTION WILL BE UNDERTAKEN BY ME IN ORDER TO REMOVE THE FILES ON YOUR BEHALF IF EVER YOU NEED TO POST IT IN YOUR BLOG/WEBSITE, IF YOU FEEL YOU ARE NOT SATISFIED WITH MY WORK, CONSTRUCTIVE CRITICISMS IN A RESPECTFUL AND DECENT MANNER ARE ALWAYS WELCOME
Click to expand...
Click to collapse
IF YOU DON'T KNOW WHAT YOU ARE DOING,
BETTER NOT MESS WITH YOUR SYSTEM OR ELSE IT WILL CAUSE UNDESIRED OPERATION,
Prerequisites:
1. ANDROID GINGERBREAD DEVICE (Preferably deodexed Stock ROM)
2. Decompiling Studio (Apktool, VTS- (recommended), Apk Multi-tool, Android SDK)
3. Winrar (or any archive reader and writer software)
4. Patience
5. A keen eye
6. Coffee (lots and lots of em)
Click to expand...
Click to collapse
What's Not Covered in this Tutorial
1. Decompiling System App process
2. Recompiling System App Process
3. Installing Android SDK and Development Studio (VTS, Apktool, etc.)
Click to expand...
Click to collapse
[Moving Clock to status bar notifications]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/layout/status_bar.xml
3. Search for this line and remove it from the xml
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
4. Go to res/values/ids,xml
add this below the last item type before </resources>
Code:
<item type="id" name="clock">false</item>
5. Now, Go to res/layout/status_bar_expanded.xml
Search for this code
Code:
<LinearLayout android:orientation="horizontal" android:background="@drawable/quickpanel_plmn_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
then paste this code below the code above
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="20.0sp" android:gravity="center" android:id="@id/clock" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
6. Recompile the apk
Additional Instructions if Modified from a custom rom:
7. Extract inside classes.dex from the unmodified systemui.apk
8. Delete classes.dex from the new systemui.apk
9. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
[Moving Carrier Logo to bottom of status bar]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/layout/status_bar_expanded.xml
3. Search for this line and remove it from the xml
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
4. Create a PNG with dimensions of 240x26px (240 width 26 height by pixels) save it as deathnotice_shade.png save to res/drawable-ldpi
5. Go to res/values/ids,xml
add this below the last item type before </resources>
Code:
<item type="id" name="carrier_label_background">false</item>
6. Go to res/layout/status_bar_tracking.xml
7. Search for this line
Code:
<com.android.systemui.statusbar.TrackingView android:orientation="vertical" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
then paste this code below the line above
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="18.659973dip" android:textColor="#ffffffff" android:gravity="center" android:paddingBottom="0.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/deathnotice_shade" android:layout_marginTop="0.0dip" />
8. Recompile the APK
Additional Instructions if Modified from a custom rom:
9. Extract inside classes.dex from the unmodified systemui.apk
10. Delete classes.dex from the new systemui.apk
11. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
[Adding your own custom background to the statusbar]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/layout/status_bar_tracking.xml
3. Create a PNG with dimensions of 240x301px (240 width 301 height by pixels) save it as status_bar_background.png save to res/drawable-ldpi
4. Search for this line
Code:
<com.android.systemui.statusbar.TrackingView android:orientation="vertical" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
then paste this code below the line above
Code:
<View android:background="@drawable/status_bar_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
5. Recompile APK
Additional Instructions if Modified from a custom rom:
6. Extract inside classes.dex from the unmodified systemui.apk
7. Delete classes.dex from the new systemui.apk
8. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
[Adding your own custom background to all the overall android UI]​
1. Decompile FRAMEWORK-RES.apk
2. Navigate to res/values/styles.xml
search for this
Code:
<style name="Theme">
3. Again from res/values/styles.xml
search for this
Code:
<item name="colorBackground">@color/colorBackground</item>
delete the line and replace it with this
Code:
<item name="colorBackground">@color/transparent</item>
4. Create a PNG with dimensions of 240x301px (240 width 301 height by pixels) save it as deathnotice_bg.png save to res/drawable-ldpi
5. Again from res/values/styles.xml
search for this
Code:
<item name="windowBackground">@drawable/screen_background_dark</item>
6. Delete the entire line then replace with this
Code:
<item name="windowBackground">@drawable/deathnotice_bg</item>
7. Recompile APK
[Adding you own clear button to statusbar]​
1. Decompile SYSTEMUI.apk
2. Navigate to res/drawable/
3. Create a xml named deathnoticeclear.xml
4. Add this code to the deathnoticeclear.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/deathnotice_normal" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/deathnotice_disable" />
<item android:state_pressed="true" android:drawable="@drawable/deathnotice_pressed" />
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/deathnotice_normal" />
<item android:state_enabled="true" android:drawable="@drawable/deathnotice_normal" />
<item android:state_focused="true" android:drawable="@drawable/deathnotice_normal" />
<item android:drawable="@drawable/deathnotice_normal" />
</selector>
5. 4. Create 3 PNGs with dimensions of 24x24px (24 width 24 height by pixels) save it as
-deathnotice_normal.9.png
-deathnotice_pressed.9.png
-deathnotice_disable.9.png
save to res/drawable-ldpi
6. Navigate to res/values/styles.xml
search for
Code:
</resources>
then add this code above </resources>
Code:
<style name="Awesome.Button" parent="@android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppeara nceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/deathnotice</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
7. Navigate to res/layout/status_bar_expanded.xml
find this code
Code:
<Button android:textSize="13.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="85.0dip" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:layout_marginBottom="3.0dip" android:text="@string/status_bar_clear_all_button" style="?android:attr/buttonStyleSmall" />
delete the line above
then replace it with this code
Code:
<Button android:textSize="13.0sp" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginRight="6.0dip" android:layout_marginBottom="3.0dip" android:text="@string/status_bar_clear_all_button" style="@style/Awesome.Button" />
8. Navigate to res/values/strings.xml
find this code
Code:
<string name="status_bar_clear_all_button">Clear</string>
delete the code above
replace it with this
Code:
<string name="status_bar_clear_all_button"></string>
9. Recompile APK
Additional Instructions if Modified from a custom rom:
10. Extract inside classes.dex from the unmodified systemui.apk
11. Delete classes.dex from the new systemui.apk
12. Paste classes.dex from the unmodified systemui.apk to the new systemui.apk
WILL ADD MOARE SOOOOON!
HIT THAT THANKS BUTTON YOU UNGRATEFUL PERSON!
Credits:
Kill3d
initial clear button idea
b16h22
helping me a lot with stuff
Click to expand...
Click to collapse
[/right]
post potato
2 potato
thanks......first comment
really like it
can u pls add that how to put lildroid toggels to bottom of status bar
thanks(pressed)
explodeaamir said:
thanks......first comment
really like it
can u pls add that how to put lildroid toggels to bottom of status bar
thanks(pressed)
Click to expand...
Click to collapse
thanks,
problem is i dunno how,
tried closedraghandle in statusbarservice.smali,
still nothing happens,
also tried changing gravity to vertical then right,
still nothing happends,
wierd mod is wierd,
ask evanlocked,
he's the best man on the job for that
Gonna try it out soon
can you also add how to edit settings.apk? i want to try and edit the settings,apk that killed post.
heirfister said:
can you also add how to edit settings.apk? i want to try and edit the settings,apk that killed post.
Click to expand...
Click to collapse
lol
think before u write
pls add tuts how to add aosp lockscreen
Teach us how to make/edit lock screens!
Saving the universe, one game at a time.
deathnotice01 said:
thanks,
problem is i dunno how,
tried closedraghandle in statusbarservice.smali,
still nothing happens,
also tried changing gravity to vertical then right,
still nothing happends,
wierd mod is wierd,
ask evanlocked,
he's the best man on the job for that
Click to expand...
Click to collapse
Take the statusbarservice.smali
In the code following
Code:
const v7, 0x3030003
invoke-static {p1, v7, v9},
Landroid/view/View;->inflate
(Landroid/content/
Context;ILandroid/view/ViewGroup;)
Landroid/view/View;
move-result-object v3
check-cast v3, Lcom/lidroid/
systemui/quickpanel/PowerWidget;
.line 352
.local v3, qsv:Lcom/lidroid/
systemui/quickpanel/PowerWidget;
invoke-virtual {v3}, Lcom/lidroid/
systemui/quickpanel/
PowerWidget;->setupWidget()V
change mExpandedView&ExpandedView to mCloseView&CloseDragHandle.
Sent from my GT-S5360 using xda app-developers app
thank i will try
death
u can add b16h22 post
Subscribed!
★ Sent from a Galaxy far far away... ★
Yes, I copied this, and there's nothin' you can do about it... :badpokerface:
thanks for the tut!
Nice
thanks everyone,
will update this earlier tonight,
i'm actually sneeking on the company's PC so i can't be too vigilant,
So good Guide!Thanks-------I will try it later:laugh:
A guide to change status bar like winter mod evo is appreciated. Seperation toggles and notification. Thanks a lot for other tutors.
Dont forget add credit. Just in case
Sent from my GT-S5360 using xda premium
Could please tell me how to apply transparent background in all apps.
Editing framework-res.apk what line to replace with...
Sent from my GT-S5360 using xda premium

[HOWTO][MOD] Create Battery % MOD on Any ROM

Enable % Battery and Icons
Tools Required :
1. apktool (For Decompile/Compile)
2. Notepad++ (Windows) Or Text Editor (OSX)
3. 7zip (Windows)
4. Java Runtime
Steps -
1. Extract all files for apktool into a folder (Lets say /apktool for this example)
2. Extract files from your phone and copy into apktool folder :
/system/framework/framework-res.apk
/system/framework/com.htc.resources.apk
/system/app/SystemUI.apk
3. Open a command/terminal prompt at /apktool
4. Run following commands :
apktool if framework-res.apk (OSX - ./apktool if framework-res.apk)
apktool com.htc.resources.apk (OSX - ./apktool if com.htc.resources.apk)
apktool d SystemUI.apk (OSX - ./apktool d SystemUI.apk)
5. This should decompile the SystemUI apk successfully and create folder SystemUI in /apktool
6. Change into SystemUI folder. Edit file - res/drawable/stat_sys_battery.xml
7. Remove all lines between following lines :
xmlns:android="http://schemas.android.com/apk/res/android">
....
</level-list>
8. Copy and paste the following lines in place
Code:
<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" />
<item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="101" />
9. Save and exit the file
10. Now to explain the other file "stat_sys_battery_charge.xml"
Each percent of battery has its own set of animation list going from current battery to 100% with given amount of millisecond gap on each icon. This forms the Animation part.
Example -
Code:
<item android:maxLevel="95">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="300" android:drawable="@drawable/stat_sys_battery_charge_anim95" />
<item android:duration="300" android:drawable="@drawable/stat_sys_battery_charge_anim96" />
<item android:duration="300" android:drawable="@drawable/stat_sys_battery_charge_anim97" />
<item android:duration="300" android:drawable="@drawable/stat_sys_battery_charge_anim98" />
<item android:duration="300" android:drawable="@drawable/stat_sys_battery_charge_anim99" />
<item android:duration="300" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
Each icon is shown for 300ms and goes in a loop. So we need 101 such <item> tags to complete the xml. 101 indicates battery full and can have code as follows :
Code:
<item android:maxLevel="101">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="3000" android:drawable="@drawable/stat_sys_battery_charge_animfull" />
</animation-list>
</item>
This basically stops any animation on battery full (Same icon is refreshed every 3 seconds) and shows a special icon (animfull). Note that all this is upto your icon naming convention. The examples given here are what is mostly stock and used.
As you must have gathered by now that creating such XML manually is a really tedious job. So I will be attaching a Windows program and script for OSX which will generate such XML based on your inputs.
Also note that if you do not want animation, you can copy over the lines from the non-charging xml given above and use same list for the charging xml. The names can be changed from normal to _anim to reflect the charging icons.
11. Save and exit the charging xml file
12. Copy over your set of 1% icons to res/drawable-xhdpi (Replace existing)
13. Remove all such named icons from res/drawable-hdpi
14. Recompile the apk using command prompt :
apktool b SystemUI (OSX - ./apktool b SystemUI)
15. New compiled apk will be available in /apktool/SystemUI/dist
16. You can use attached template zip and open (DO NOT EXTRACT) using 7z
17. Change into system/app folder in 7z and drag the new compiled SystemUI.apk into it. Answer YES if you get prompt in 7z
18. Similarly use the template to create an original zip for your untouched SystemUI.apk for reverting back to original
19. Flash away in Recovery and Enjoy!
Click to expand...
Click to collapse
TOOLS
Windows
Download here
{
"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"
}
Fields :
1. Animation Duration : Number of milliseconds to wait at each icon
2. Filename Prefix : Filename prefix to be used for animation icons (Part of filename before the 01-100 numbers)
3. Animation Flag : Y for animated charging icons, N for standard animated icons without animation xml
Extract the exe from WIN_xmlgen_battperc in attachment and copy to apktool folder. Run the tool and click Generate after selecting options. It will prompt when done and the xml will be created in the same folder as the exe file.
NOTE - Existing stat_sys_battery_charge.xml will be overwritten without warning.
Click to expand...
Click to collapse
OSX/Linux
Download here
Fields :
1. Animation Duration : Number of milliseconds to wait at each icon
2. Filename Prefix : Filename prefix to be used for animation icons (Part of filename before the 01-100 numbers)
3. Animation Flag : Y for animated charging icons, N for standard animated icons without animation xml
Copy the script from within the OSX_xmlgen_battperc in attachment and copy over to apktool folder.
Set execute permission on the script using GUI or terminal (chmod +x xmlgen_battperc.sh)
Change to apktool folder in Terminal and Run the script (sh xmlgen_battperc.sh or ./xmlgen_battperc)
It will create the charging xml in same folder as the script.
NOTE - Existing stat_sys_battery_charge.xml will be overwritten without warning.
Click to expand...
Click to collapse

[DISCONTINUED][GUIDE]Recent App Shortcut in Statusbar[GB]

Recent App Shortcut in Statusbar​
Steps:
1.Decompile SystemUI.apk
2.Go to \res\values\ and open ids.xml
3.Add this line before </resources>
Code:
<item type="id" name="recent_app_button">false</item>
4.Now go to \res\layout\ and open statusbar_expanded.xml
5.Search for something like this or related to this
Code:
<Button android:textSize="15.0sp" android:id="@id/clear_all_button" android:paddingRight="6.0dip" android:layout_width="46.0dip" android:layout_height="46.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" style="@style/Clear.Buttons"/>
6.Add this line above it
Code:
<com.android.systemui.statusbar.RecentAppButton android:textSize="10.0dip" android:id="@id/recent_app_button" android:background="@drawable/btn_recent_app" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="center" android:layout_toRightOf="@id/settings_button" />
7.Download the attachment zip file and extract the smali file to /smali/com/android/systemui/statusbar/(here) and the png to \res\drawable-ldpi\(here).
8.Recompile the apk
9.Push it back to system/app
10.Reboot!!Done!!
Credits:
-lokeshsaini94
-xda
-google

Categories

Resources