Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,421 Members 38,915 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 94
Posts: 173
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:	146
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 Phone: Sony Xperia Go(27i)
Bootloader : Unlocked
ROM: Xperia STE CM 11 Stable v2
Kernel: Stock
Recovery:TWRP v2.8.0.0

My Tablet PC: ASUS Nexus 7 2013 Wi-Fi
Bootloader : Unlocked
ROM: Carbon 18.09.14
Kernel: Stock
Recovery:TWRP v2.8.0.1
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: 113
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 94
Posts: 173
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 Phone: Sony Xperia Go(27i)
Bootloader : Unlocked
ROM: Xperia STE CM 11 Stable v2
Kernel: Stock
Recovery:TWRP v2.8.0.0

My Tablet PC: ASUS Nexus 7 2013 Wi-Fi
Bootloader : Unlocked
ROM: Carbon 18.09.14
Kernel: Stock
Recovery:TWRP v2.8.0.1
The Following User Says Thank You to SonyFan23 For This Useful Post: [ Click to Expand ]
 
Joker.
Old
#4  
Senior Member
Thanks Meter 11
Posts: 113
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: 249
Join Date: Dec 2013
Location: Gorzyczki, Śląskie
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 94
Posts: 173
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 Phone: Sony Xperia Go(27i)
Bootloader : Unlocked
ROM: Xperia STE CM 11 Stable v2
Kernel: Stock
Recovery:TWRP v2.8.0.0

My Tablet PC: ASUS Nexus 7 2013 Wi-Fi
Bootloader : Unlocked
ROM: Carbon 18.09.14
Kernel: Stock
Recovery:TWRP v2.8.0.1
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Change Your Samsung Galaxy S2’s Dialer Background in Real Time

As with anything, if youve looked at something long enough, things can … more

Increase Your Multitasking Workflow with C-Floating Windows

Technology has put life on the fast track. Lazy, relaxed days have turned into … more

Compile Your Own Kernel From Source with Comprehensive Tutorial

One glance at any developer section of any device forum on XDA and youll find … more

WowWee Mip – Android Accessory Review – XDA Developer TV

The holidays will be here in no time, so why not start thinking about … more