[MOD AND GUIDE]How To Center The Clock On The Statusbar.(A2017G)(A2017U)

kenet

Senior Member
Jun 15, 2010
355
526
93
Leon
www.androidmod.net
decompile SystemUI_ZTE.apk
open layout/status_bar.xml

remove

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/system_bar_background" android:focusable="false" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
  xmlns:mifavor="http://schemas.android.com/apk/res/com.android.systemui">
    <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" />
    <LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip" android:paddingEnd="8.0dip">
        <com.android.keyguard.CarrierText android:textAppearance="?android:textAppearanceSmall" android:textColor="#ffffffff" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@id/status_carrier_text" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="@dimen/match_parent" android:singleLine="true" mifavor:type="status_bar" />
        <com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
            <com.android.systemui.statusbar.StatusBarIconView android:id="@id/joinIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
            <TextView android:layout_gravity="center_vertical" android:orientation="horizontal" android:id="@id/joinIconNumber" android:paddingLeft="2.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
            <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
            <com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentStart="true" />
        </com.android.keyguard.AlphaOptimizedLinearLayout>
        <com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <TextView android:textSize="@dimen/mifavor_speed_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/speed_level" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="2.0dip" android:text="32 B/S" />
            <include layout="@layout/system_icons" />
            <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/mifavor_clock_text_size" android:textColor="#ffffffff" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="@dimen/status_bar_clock_starting_padding" android:paddingEnd="@dimen/status_bar_clock_end_padding" />
        </com.android.keyguard.AlphaOptimizedLinearLayout>
    </LinearLayout>
    <ViewStub android:id="@id/emergency_cryptkeeper_text" android:layout="@layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Replace

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/system_bar_background" android:focusable="false" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
  xmlns:mifavor="http://schemas.android.com/apk/res/com.android.systemui">
  <LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
  <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/mifavor_clock_text_size" android:textColor="#ffffffff" android:gravity="center" android:id="@id/clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="@dimen/status_bar_clock_starting_padding" android:paddingEnd="@dimen/status_bar_clock_end_padding" />
  </LinearLayout>
    <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" />
    <LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip" android:paddingEnd="8.0dip">
        <com.android.keyguard.CarrierText android:textAppearance="?android:textAppearanceSmall" android:textColor="#ffffffff" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@id/status_carrier_text" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="@dimen/match_parent" android:singleLine="true" mifavor:type="status_bar" />
        <com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
            <com.android.systemui.statusbar.StatusBarIconView android:id="@id/joinIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
            <TextView android:layout_gravity="center_vertical" android:orientation="horizontal" android:id="@id/joinIconNumber" android:paddingLeft="2.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
            <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
            <com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentStart="true" />
        </com.android.keyguard.AlphaOptimizedLinearLayout>
        <com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <TextView android:textSize="@dimen/mifavor_speed_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/speed_level" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="2.0dip" android:text="32 B/S" />
            <include layout="@layout/system_icons" />
        </com.android.keyguard.AlphaOptimizedLinearLayout>
    </LinearLayout>
    <ViewStub android:id="@id/emergency_cryptkeeper_text" android:layout="@layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
open values/dimens.xml

search

Code:
<dimen name="status_bar_clock_starting_padding">7.0dip</dimen>
    <dimen name="status_bar_clock_end_padding">0.0dip</dimen>
Replace

Code:
<dimen name="status_bar_clock_starting_padding">5.0dip</dimen>
    <dimen name="status_bar_clock_end_padding">5.0dip</dimen>
recompile SystemUI.

DOWNLOAD

A2017G_B04

A2017G_B05

A2017U_B25

For those who want their clock centered, i compiled the N-B09 : https://androidfilehost.com/?fid=889964283620773348 (by @raystef66 )

For those who want their clock centered, i compiled the N-B35 : https://androidfilehost.com/?fid=673956719939817113 (by @raystef66 )

For those who want their clock centered, i compiled a while ago the A2017G-N-B10 : https://androidfilehost.com/?fid=962187416754472615 (by @raystef66 )

 
Last edited:

neo4uo

Senior Member
Nov 27, 2010
943
280
0
Alabama
I see you have 3minit working also :) I said something on your other thread. Any possibilities of you making a zip with this center clock MOD and 3minit battery for b25?
 
  • Like
Reactions: kenet

dj_jormi

Member
Jul 9, 2008
40
9
0
Just to update the list :cyclops:
Center Clock on A2017G N-B10
For those who want their clock centered, i compiled a while ago the A2017G-N-B10 : https://androidfilehost.com/?fid=962187416754472615
This file is only to use on A2017G-N-B10 !
Just flash in TWRP and reboot. Done !


E N J O Y !

Hi my friend ! @kenet : feel free to update OP :good:
Help!! For stock mode, no center clock?? Can you send a zio for stock mode?? (No center mode). I have A2017G-N-B10 but i dont like in center.

Thanks!!
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone