[Miscellaneous Android Development] aryan_ar:
So, Many Of You Have Added Lidroid Grid Toggles, In Your SystemUI, Or Many May Not :p

Today I 'm Here You To Show How To Move/Delete Any Lidroid Specific Toggle(s)

Guide Is Presented In Two Parts:

1.

Moving Toggle(s).

2.

Deleting Toggle(s).

PART 1: Moving Toggles

Decompile Your SystemUI.

Goto smali/com/lidroid/systemui/quickpanel.

Open PowerWidget.smali.

Let Us Suppose, We Are Deleting Sync Toggle.

Search "sync" in PowerWidet.smali.

You will Get 2 Result: (Do This In Both)

# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleAirplane[COLOR="Red"]|toggleSync[/COLOR]"

.line 169
const-string v4, "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleAirplane[COLOR="Red"]|toggleSync[/COLOR]"

"put the code |togglesync in between any other toggle, where u want to put"

# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate[COLOR="Red"]|toggleSync[/COLOR]|toggleAirplane"

.line 169
const-string v4, "toggleWifi|toggleBluetooth|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate[COLOR="Red"]|toggleSync[/COLOR]|toggleAirplane"

save it, close it

Compile SystemUI

Then paste it to System/apps

Reboot The Device

PART 2: Deleting Toggles

If You Want To Delete Toggle, (Let Us Try Deleting "Bluetooth" ), Open PowerWidget.smali

Delete The Red Code

# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi[COLOR="Red"]|toggleBluetooth[/COLOR]|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleSync|toggleAutoRotate|toggleAirplane"

It Will Look Like This Now:

# static fields
.field private static final BUTTONS_DEFAULT:Ljava/lang/String; = "toggleWifi|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleSync|toggleAutoRotate|toggleAirplane"

Do The Same Here Too:

.line 169
const-string v4, "toggleWifi[COLOR="Red"]|toggleBluetooth[/COLOR]|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleSync|toggleAirplane"

It Will Look Like This:

.line 169
const-string v4, "toggleWifi|toggleMobileData|toggleSound|toggleFlashlight|toggleScreenTimeout|toggleAutoRotate|toggleSync|toggleAirplane"

Save and Close It.

Open PowerButton.smali

Search "bluetooth"

Now Delete The Red Code:

.field public static final BUTTON_AUTOROTATE:Ljava/lang/String; = "toggleAutoRotate"

[COLOR="Red"].field public static final BUTTON_BLUETOOTH:Ljava/lang/String; = "toggleBluetooth"[/COLOR]

.field public static final BUTTON_FLASHLIGHT:Ljava/lang/String; = "toggleFlashlight"

.line 56
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;

const-string v1, "toggleMobileData"

const-class v2, Lcom/lidroid/systemui/quickpanel/MobileDataButton;

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

[COLOR="Red"] .line 58
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;

const-string v1, "toggleBluetooth"

const-class v2, Lcom/lidroid/systemui/quickpanel/BluetoothButton;

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;[/COLOR]

.line 59
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;

const-string v1, "toggleSound"

const-class v2, Lcom/lidroid/systemui/quickpanel/SoundButton;

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

After Deleting, It Will Look Like This:

.field public static final BUTTON_AUTOROTATE:Ljava/lang/String; = "toggleAutoRotate"

.field public static final BUTTON_FLASHLIGHT:Ljava/lang/String; = "toggleFlashlight"

.line 56
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;

const-string v1, "toggleMobileData"

const-class v2, Lcom/lidroid/systemui/quickpanel/MobileDataButton;

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

.line 59
sget-object v0, Lcom/lidroid/systemui/quickpanel/PowerButton;->BUTTONS:Ljava/util/HashMap;

const-string v1, "toggleSound"

const-class v2, Lcom/lidroid/systemui/quickpanel/SoundButton;

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

Save It and Close It.

Also delete Bluetooth smali(s) in quickpanel folder

i.e. delete

[B]
BluetoothButton.smali
BluetoothButton$BluetoothStateTracker.smali
BluetoothButton$BluetoothStateTracker$1.smali
BluetoothButton$1.smali
[/B]

(So What We Have Done Here?...We Just Delete Its Main And Derived Smalis)

Now Compile App

Paste It To system/app

Reboot Device

......................................................................................................................................................

Press Thanks If This Guide Helped You :D:D:D

......................................................................................................................................................