22nd June 2012, 10:46 AM
(Last edited by wanam; 8th September 2012 at 01:30 PM .)
Recognized Developer -
OP
Thanks Meter
13790
Posts: 3,493
Join Date: Jan 2011
Location: Temara
[How To] Add Customizable 15 Statusbar Toggle Buttons to ICS Roms
A new Jelly bean how to was posted here .
This mod was built by Lidroid so all credits goes to him .
Lidroid ported his toggles to LF2 Roms, but sadly it depend on his toolbox framework.
I managed to get the needed packages from his framework, i included all toggles source code in SystemUI, to make it easy to port on next updates.
Let start, you need to decompile SystemUI.apk (use my repacked
Apk_Manager if you get any issue with ICS files).
Edit "SystemUI.apk\res\layout\tw_status_bar_expanded.xm l" and make these changes, this will hide the stock status bar and use the new one:
Code:
-- <HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content"
++ <com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" />
++ <HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content"
Edit "SystemUI.apk\res\values\ids.xml" and add this Id:
Code:
++ <item type="id" name="exp_power_stat">false</item>
Edit "SystemUI.apk\smali\com\android\systemui\statusbar \phone\PhoneStatusBar.smali" and make these changes :
Code:
.field mPostCollapseCleanup:Ljava/lang/Runnable;
++ .field mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
.field mQueueLock:Ljava/lang/Object;
Method "addIcon" :
Code:
invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
++ iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
++ invoke-virtual {v1}, Lcom/wanam/systemui/quickpanel/PowerWidget;->updateWidget()V
return-void
Method "makeStatusBarView"
Code:
iput-object v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
++ const v18, 0x7f0f00d9
++ move/from16 v0, v18
++ invoke-virtual {v6, v0}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
++ move-result-object v18
++ check-cast v18, Lcom/wanam/systemui/quickpanel/PowerWidget;
++ move-object/from16 v0, v18
++ move-object/from16 v1, p0
++ iput-object v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
sget-boolean v18, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
Code:
iput-boolean v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mUseStatusBarMarquee:Z
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->tw_loadNotificationShade()V
++ move-object/from16 v0, p0
++ iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;
++ invoke-virtual {v0}, Lcom/wanam/systemui/quickpanel/PowerWidget;->setupWidget()V
return-object v13
Extract attached "wanam.zip" and copy "wanam" folder to your "SystemUI.apk\smali\com".
That's all, recompile your SystemUI.
After building, make sure your Id "exp_power_stat" got the public id "0x7f0f00d9", if you got a different Id, change the public Id in the "makeStatusBarView" method.
Download
this file , you need to copy Toggle buttons resources "lidroid-res.apk" to "system/framework", and "QuickPanelSettings.apk" to "/system/app" (with permissions 644) to customize your toggles.
You will need to mod lidroid-res.apk to get rid of "WanamLite Rom" label while trying to reboot, i posted a
how to here .
WanamLite Roms :
Adam Kernel :
App : Language Enabler
Blog : WanamLite.com
Follow : GooglePlus ,
FaceBook -
Twitter
The Following 45 Users Say Thank You to wanam For This Useful Post: [ Click to Expand ]
6pudu5 (26th June 2012),
::indie:: (22nd June 2012),
Alex Charles (22nd June 2012),
androidphone2012 (5th October 2012),
antonio8297 (17th February 2013),
Atarii (22nd June 2012),
ausdim (25th June 2012),
barikke74 (22nd June 2012),
bmann_420 (14th September 2012),
criskelo (23rd June 2012),
cust0mworx (23rd June 2012),
dasistsparta (27th June 2012),
drothenberger (22nd September 2012),
drrossum (22nd January 2013),
EdgaBimbam (27th June 2012),
EduardoGM (10th July 2012),
elgonspain (24th September 2012),
fera2k (2nd July 2012),
firefds (23rd June 2012),
gh.rohit (25th June 2012),
iTK (2nd September 2012),
janarthanan.v (19th August 2012),
jcejohnson (11th August 2012),
Kilian88 (28th June 2012),
kürsat07 (21st February 2013),
lolo250612 (2nd December 2012),
lolos (7th September 2012),
losta (22nd June 2012),
maximoz (22nd June 2012),
MifkoKE (14th April 2013),
mike@taipei (22nd June 2012),
nachonovoa27 (2nd March 2013),
nobnut (22nd June 2012),
OptimalKiller (23rd June 2012),
qwerty12 (8th July 2012),
rchtk (7th July 2012),
robsonr (16th August 2012),
sam.jh (7th August 2012),
sangosnip69 (22nd June 2012),
Swyzzlestickz (8th October 2012),
thisiskindacrap (2nd September 2012),
tora33 (24th June 2012),
TotallydubbedHD (12th July 2012),
xda39 (30th June 2012),
Zanr Zij (22nd June 2012)
22nd June 2012, 10:57 AM
Senior Member
Thanks Meter
2164
Posts: 1,260
Join Date: Feb 2012
Location: Rio Bonito
Nice Wanam!
Thank you for sharing stuffs so cool like that.
A really great developer you are.
Google Nexus 4
crDroid AOSP [4.2.2][CM10.1 + Features]
Galaxy S3 i9300
crDroid v17.1 XXEMC3 [AROMA]
Think i helped you? hit thanks!
-------------------------------
PayPal Donate
-------------------------------
22nd June 2012, 10:58 AM
Recognized Developer
Thanks Meter
27479
Posts: 4,634
Join Date: May 2010
Thank you for porting lidroids mod wanam,
and thank you for sharing with us!
Great job as always
The Following 2 Users Say Thank You to ::indie:: For This Useful Post: [ Click to Expand ]
22nd June 2012, 12:55 PM
Senior Member
Thanks Meter
347
Posts: 566
Join Date: Dec 2010
Location: Lyon
DONATE TO ME
Very nice work wanam!
Developer of SaNgO Vizion
If I've helped you, please press the thanks button!
This encourage me to continue my work!
22nd June 2012, 03:20 PM
Retired Forum Moderator / Recognized Developer
Thanks Meter
5203
Posts: 3,123
Join Date: Sep 2010
Location: India,Kerala,Trivandrum (God's own Country)
Already added it
Sent from my GT-I9300 using Tapatalk 2
Founder and Developer of CheckROM™ for Samsung Phone's
22nd June 2012, 03:45 PM
Senior Member
Thanks Meter
72
Posts: 270
Join Date: Jul 2011
Location: Örebro
Hi wanam!
I'm using this mod along with your latest ROM. There is a minor issue regarding the Wifi/Data toggle.
It looks like when wifi is connected (it does work when WiFi is on but not connected), the data icon doesnt refresh when you toggle it. I think the problem is just that it doesn't refresh since it seems that it does respond to the toggle itself.
Any ideas?
Thanks in advance
22nd June 2012, 03:52 PM
Recognized Contributor / Recognized Developer
Thanks Meter
3394
Posts: 5,872
Join Date: Oct 2011
Location: Mumbai
DONATE TO ME
You are awesome
22nd June 2012, 03:56 PM
Recognized Developer -
OP
Thanks Meter
13790
Posts: 3,493
Join Date: Jan 2011
Location: Temara
Quote:
Originally Posted by
m33ts4k0z
Hi wanam!
I'm using this mod along with your latest ROM. There is a minor issue regarding the Wifi/Data toggle.
It looks like when wifi is connected (it does work when WiFi is on but not connected), the data icon doesnt refresh when you toggle it. I think the problem is just that it doesn't refresh since it seems that it does respond to the toggle itself.
Any ideas?
Thanks in advance
I can't reproduce it now, but yes i used to get this issue sometimes with these toggles on my Galaxy S2, does it freeze too from the data ON/OFF settings?
I will investigate later.
WanamLite Roms :
Adam Kernel :
App : Language Enabler
Blog : WanamLite.com
Follow : GooglePlus ,
FaceBook -
Twitter
22nd June 2012, 05:01 PM
Senior Member
Thanks Meter
72
Posts: 270
Join Date: Jul 2011
Location: Örebro
Quote:
Originally Posted by
wanam
I can't reproduce it now, but yes i used to get this issue sometimes with these toggles on my Galaxy S2, does it freeze too from the data ON/OFF settings?
I will investigate later.
Hi and thanks for your fast answer.
Actually it does toggle normally in the settings while using the bar's toggle button. It's just that the icon on the bar doesnt refresh. I flashed your 1.3 ROM over your 1.2 without wipe. Can this cause the issue?
22nd June 2012, 05:17 PM
Senior Member
Thanks Meter
82
Posts: 610
Join Date: May 2010
Location: Orléans - FRANCE -
Quote:
Originally Posted by
::indie::
Thank you for porting lidroids mod wanam,
and thank you for sharing with us!
Great job as always
waiting for omega v6.1 lol
Thread Tools
Search this Thread
Display Modes
Linear Mode
Most Thanked In This Thread
5 New JB how to posted here. 5 (quote)
I will try
after Eid ul-Fitr … 2 Not sure if this is the
right place for … 2 Eid Mubarak bro .