[Galaxy Y GT-S5360 General] mariozawa:
​

I just want to share this little Mod I hope someone will learn from this :D

1. Decompile SystemUI.apk first

2. Find this line on SystemUI.apk\res\layout\statusbar.xml

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">

3. Then choose from this Layout :D

(We only need to Modify the codes inside the Layout with android:id="@id/icons" )

CENTER CLOCK

[COLOR="Red"]<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">[/COLOR]
<com.android.systemui.statusbar.Clock android:textStyle="normal" android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="center" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
[COLOR="Red"]</LinearLayout>[/COLOR]

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="left" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="right" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
</LinearLayout>

I just Add a new LinearLayout that will hold our Clock.

CLOCK TO LEFT

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textStyle="normal" android:textAppearance="@android:style/TextAppearance.StatusBar.Icon"[COLOR="Red"] android:gravity="left"[/COLOR] android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<com.android.systemui.statusbar.IconMerger [COLOR="Red"]android:gravity="left"[/COLOR] android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout [COLOR="Red"]android:gravity="right"[/COLOR] android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
</LinearLayout>

I just change their gravity so they will be positioned in their own gravity.

And I also change their orders in this code.

SWITCH

<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout [COLOR="Red"]android:gravity="left"[/COLOR] android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.IconMerger [COLOR="Red"]android:gravity="left"[/COLOR] android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR="Red"]android:gravity="right"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>

I just change their gravity so they will be positioned in their own gravity.

And I also change their orders in this code.

LEFT SIDE DRIVE (LSD):p

<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR="Red"]android:gravity="left"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<LinearLayout [COLOR="Red"]android:gravity="left"[/COLOR] android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.IconMerger [COLOR="Red"]android:gravity="left"[/COLOR] android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
</LinearLayout>

I just change their gravity so they will be positioned in their own gravity.

And I also change their orders in this code.​

BTW Im on AOSP so if your statusbar.xml didn't have this android:textAppearance="@android:style/TextAppearance.StatusBar.Icon"

just copy the style from your statusbar.xml