FORUMS
Remove All Ads from XDA

[How To] Add Customizable 15 Statusbar Toggle Buttons to ICS Roms

6,189 posts
Thanks Meter: 30,059
 
By wanam, Recognized Contributor / Developer on 22nd June 2012, 10:46 AM
Thread Closed Email Thread
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 .
Attached Files
File Type: zip wanam.zip - [Click for QR Code] (52.4 KB, 2137 views)
The Following 50 Users Say Thank You to wanam For This Useful Post: [ View ]
 
 
22nd June 2012, 10:57 AM |#2  
Cristiano Matos's Avatar
Senior Member
Flag Nibiru
Thanks Meter: 11,998
 
More
Nice Wanam!

Thank you for sharing stuffs so cool like that.

A really great developer you are.
22nd June 2012, 10:58 AM |#3  
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: [ View ]
22nd June 2012, 12:55 PM |#4  
sangosnip69's Avatar
Senior Member
Flag Lyon
Thanks Meter: 403
 
Donate to Me
More
Very nice work wanam!
22nd June 2012, 03:20 PM |#5  
Already added it

Sent from my GT-I9300 using Tapatalk 2
22nd June 2012, 03:45 PM |#6  
Senior Member
Flag Örebro
Thanks Meter: 86
 
More
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 |#7  
gh.rohit's Avatar
Inactive Recognized Developer
Flag Mumbai
Thanks Meter: 4,104
 
Donate to Me
More
You are awesome
22nd June 2012, 03:56 PM |#8  
wanam's Avatar
OP Recognized Contributor / Developer
Flag ElKsiba
Thanks Meter: 30,059
 
Donate to Me
More
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.
22nd June 2012, 05:01 PM |#9  
Senior Member
Flag Örebro
Thanks Meter: 86
 
More
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 |#10  
djase's Avatar
Senior Member
Thanks Meter: 117
 
More
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
22nd June 2012, 07:06 PM |#11  
Senior Member
Flag Ulm
Thanks Meter: 196
 
More
Quote:
Originally Posted by GadgetCheck

Already added it

Sent from my GT-I9300 using Tapatalk 2

But it`s not in the kitchen, isn`t it?
Thread Closed Subscribe to Thread

Tags
15 toggle, bar, customize, lidroid, status
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes