[Xperia Arc Themes and Apps] Erhany:
Hello guys,

While I was modding SystemUI.apk, a lot of users were asking about moving toggles from top so finally we are able to do it.

I was surfing on Galaxy Y forums and found [MENTION=4504331]dcsms[/MENTION] 's THIS guide and edited smali codes for our devices.

And also downloaded [MENTION=3862405]SpaceCaker[/MENTION] 's modded SystemUI, to put modded smali codes to the right view/area..

Here's the shot:

Lets begin..

Step 1 - XML/Layout Part

- Decompile SystemUI.apk and go to res/values/ids.xml and add a new ID to the end of list. Here I gave erhanylidroid.

<item type="id" name="erhanylidroid">false</item>

save and close.

- go to res/values/public.xml and add the code to the end of ID list.

<public type="id" name="erhanylidroid" id="[COLOR="Red"]0xYOURCODE[/COLOR]" />

CAUTION! add manually your new code. Be careful to 1-9 and a-f

my last ID code was 0x7f0b001a so new code is 0x7f0b001b --(1a) > (1b)--

save and close.

- go to res/layout/status_bar_expanded.xml and create this linearlayout whereever you want to use ur toggles..

<LinearLayout android:id="@id/erhanylidroid" android:layout_width="fill_parent" android:layout_height="wrap_content" />

save and close.

Step 2- SMALI Part

- go to com/android/systemui/statusbar/StatusBarService.smali

find # instance fields line and add this code to the end of fields. (above #direct methods)

.field l1:Landroid/widget/LinearLayout;

- then find .method private makeStatusBarView(Landroid/content/Context;)V line and add this code into somewhere above .end method.

[COLOR="Red"].line 304[/COLOR]

const v2, [COLOR="Red"]0xYOURCODE[/COLOR]

invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;

move-result-object v2

check-cast v2, Landroid/widget/LinearLayout;

iput-object v2, p0, Lcom/android/systemui/statusbar/StatusBarService;->l1:Landroid/widget/LinearLayout;

CAUTION! : Add your public code here.. And check .line 304 if it is not used in that view. I had line 303 and 305 so I created 304. So if you try on other device check a free line in that view.

-and final;

search PowerWidget and find its' line. here is mine: Red line is edited/new version. So change your codes to this new codes!

.line 326
iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;

invoke-virtual {p1, v6, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

const v6, 0x7f030007

invoke-static {p1, v6, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

move-result-object v5

check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;

[COLOR="Red"].local v5, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
const/4 v11, 0x0

invoke-virtual {v5}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V

iget-object v6, p0, Lcom/android/systemui/statusbar/StatusBarService;->l1:Landroid/widget/LinearLayout;

invoke-virtual {v6, v5, v11}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V

[/COLOR]return-void
.end method

-save and close.

Compile apk and ready to use..

Happy mods.

Credits

Sony for SystemUI
[MENTION=4504331]dcsms[/MENTION] [MENTION=3862405]SpaceCaker[/MENTION]