Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,772,461 Members 47,412 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: 166
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:	135
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:
<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:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Add
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:
<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:
<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:
<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:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
After these lines
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
Insert
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:
<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: 105
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:
<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:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Add
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:
<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:
<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:
<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:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
After these lines
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
Insert
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:
<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: 166
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: 105
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 40
Posts: 245
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: 166
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


Get Your Special xda:devcon ’14 Hotel And Conference Rate While It Lasts

By now you’ve definitely heard about XDA’s … more

Google Chromecast Rootable Once Again!

Over the six months, theGoogle Chromecasthas gained a considerable amount of official functionality. … more

YAATA isn’t Just Another Android Texting App

Although our mobile devices today are capable of executingnearly every task we normally … more

MacroDroid Update Brings Android Wear Automation

A few months ago, we talked about MacroDroid. For those who don’t remember, MacroDroid … more