Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,027 Members 48,189 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE][ICS/JB/CM 11]Move the clocks in the center

Tip us?
 
SonyFan23
Old
(Last edited by SonyFan23; 30th April 2014 at 12:00 PM.)
#1  
SonyFan23's Avatar
Senior Member - OP
Thanks Meter 93
Posts: 163
Join Date: Feb 2014
Location: Nikolaevsk
Default [GUIDE][ICS/JB/CM 11]Move the clocks in the center

We need:
ApkTools200b9m,Download:http://d-h.st/iRt
Notepad++,Download:http://d-h.st/i69
Just Another Tool for APK:http://d-h.st/bqP
Files: "framework-res.apk" and "SystemUl.apk"

Before decompiling status bar need:
Unpack the archive to the root ApkTools.rar C: \ drive and open the folder ApkTools
Copy into this folder the file framework-res.apk of its firmware
Now we need to establish a framework for its firmware to be able to parse all the system apk
(This operation should be done once for each firmware)
Drag the file framework-res.apk file apktool-if.cmd
Get a window:
Click image for larger version

Name:	apktools02.png
Views:	129
Size:	7.7 KB
ID:	2717304
GUIDE for ICS/JB
Decompile the status bar
Open the file "SystemUI/res/layout/status_bar.xml" via NotePad++
Remove
Code:
Select Code
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
After rows
Code:
Select Code
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Add
Code:
Select Code
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:paddingLeft="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
Instead
Code:
Select Code
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
Insert
Code:
Select Code
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:background="#ff000000" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
Click on apktool.iml ank and file is compiled

GUIDE for CM 11
Decompile the status bar
Open the file "SystemUI/res/layout/status_bar.xml" via NotePad++
Instead
Code:
Select Code
<ImageView android:id="@id/notification_lights_out" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:paddingStart="6.0dip" />
Insert
Code:
Select Code
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
After these lines
Code:
Select Code
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
Insert
Code:
Select Code
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:paddingLeft="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
    </LinearLayout>
Remove
Code:
Select Code
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="6.0dip" />
Click on apktool.iml ank and file is compiled
My Device: Sony Xperia Go(27i)
Bootloader : Unlocked
ROM: Xperia STE CM 11 Stable v1
Kernel: Stock
Recovery:TWRP v2.7.1.0
The Following 2 Users Say Thank You to SonyFan23 For This Useful Post: [ Click to Expand ]
 
Joker.
Old
(Last edited by Joker.; 1st May 2014 at 07:47 AM.)
#2  
Senior Member
Thanks Meter 11
Posts: 101
Join Date: Apr 2013
Location: Mumbai
Quote:
Originally Posted by SonyFan23 View Post
We need:
ApkTools200b9m,Download:http://d-h.st/iRt
Notepad++,Download:http://d-h.st/i69
Just Another Tool for APK:http://d-h.st/bqP
Files: "framework-res.apk" and "SystemUl.apk"

Before decompiling status bar need:
Unpack the archive to the root ApkTools.rar C: \ drive and open the folder ApkTools
Copy into this folder the file framework-res.apk of its firmware
Now we need to establish a framework for its firmware to be able to parse all the system apk
(This operation should be done once for each firmware)
Drag the file framework-res.apk file apktool-if.cmd
Get a window:
Attachment 2717304
GUIDE for ICS/JB
Decompile the status bar
Open the file "SystemUI/res/layout/status_bar.xml" via NotePad++
Remove
Code:
Select Code
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
After rows
Code:
Select Code
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Add
Code:
Select Code
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:paddingLeft="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
Instead
Code:
Select Code
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
Insert
Code:
Select Code
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:background="#ff000000" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
Click on apktool.iml ank and file is compiled

GUIDE for CM 11
Decompile the status bar
Open the file "SystemUI/res/layout/status_bar.xml" via NotePad++
Instead
Code:
Select Code
<ImageView android:id="@id/notification_lights_out" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:paddingStart="6.0dip" />
Insert
Code:
Select Code
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
After these lines
Code:
Select Code
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
Insert
Code:
Select Code
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:paddingLeft="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
    </LinearLayout>
Remove
Code:
Select Code
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="6.0dip" />
Click on apktool.iml ank and file is compiled
bro No disrespect towards our hardwork. ,but gravity box with xposed would also do the trick for JB right, ics i dunno??
 
SonyFan23
Old
#3  
SonyFan23's Avatar
Senior Member - OP
Thanks Meter 93
Posts: 163
Join Date: Feb 2014
Location: Nikolaevsk
Quote:
Originally Posted by Joker. View Post
bro No disrespect towards our hardwork. ,but gravity box with xposed would also do the trick for JB right, ics i dunno??
For JB yes, for no ICS
My Device: Sony Xperia Go(27i)
Bootloader : Unlocked
ROM: Xperia STE CM 11 Stable v1
Kernel: Stock
Recovery:TWRP v2.7.1.0
The Following User Says Thank You to SonyFan23 For This Useful Post: [ Click to Expand ]
 
Joker.
Old
#4  
Senior Member
Thanks Meter 11
Posts: 101
Join Date: Apr 2013
Location: Mumbai
Quote:
Originally Posted by SonyFan23 View Post
For JB yes, for no ICS

very nice keep up the good work
The Following User Says Thank You to Joker. For This Useful Post: [ Click to Expand ]
 
BR4KUS
Old
#5  
BR4KUS's Avatar
Senior Member
Thanks Meter 39
Posts: 236
Join Date: Dec 2013
Location: Gorzyczki
Yyy, not better install Xposed Famework and GravityBox? I think if this is easiest

Sent from my Xperia Sola using XDA Premium 4 mobile app
 
SonyFan23
Old
#6  
SonyFan23's Avatar
Senior Member - OP
Thanks Meter 93
Posts: 163
Join Date: Feb 2014
Location: Nikolaevsk
Quote:
Originally Posted by BR4KUS View Post
Yyy, not better install Xposed Famework and GravityBox? I think if this is easiest

Sent from my Xperia Sola using XDA Premium 4 mobile app
Yes, prosche.Ya wrote this manual for users to be able to learn (if desired) to edit the status bar

Sent from my Xperia Go using XDA Premium 4 mobile app
My Device: Sony Xperia Go(27i)
Bootloader : Unlocked
ROM: Xperia STE CM 11 Stable v1
Kernel: Stock
Recovery:TWRP v2.7.1.0
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

[OTA Captured] Verizon LG G Pad 8.3 Finally Gets Official KitKat Update

It’s been almost nine months since the LG G Pad … more

Enjoy Wallpaper Overload with PhotoPhase

We don’t usually feature live wallpapers on the XDA Portal unless they are somewhat innovative … more

Monitor What Your Phone’s Camera Sees with Android Wear

Having a smart device strapped to your wrist certainly has its merits. A … more

Mod Lets You Have Stereo Speakers on Your Sony Xperia Z1 (Sort Of)

The stereo speakers onthe Sony Xperia Z2areprobably a relatively large … more