center clock and how to

Search This thread

CiDev

Senior Member
Nov 25, 2013
97
62
This is for who"s on XXUBMJ6 firmware

download here:
https://www.dropbox.com/s/zke597pq8feig1d/SystemUI_center_Clock_XXUBMJ6.zip



who want's to do this:

Decompile you're SystemUI.apk

go to res/layout-sw800dp-xhdpi/status_bar.XML

open with Notepad++

and overwrite with this code

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/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <ImageView android:id="@id/black_bg" android:background="#ff000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
    <ImageView android:id="@id/notification_lights_out" android:paddingLeft="4.0dip" 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" />
    <LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:paddingLeft="1.0dip" android:paddingRight="1.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:alpha="@dimen/notification_icon_area_alpha">
            <TextView android:textSize="15.0dip" android:textColor="#ffffffff" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
            <ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
            <ImageView android:id="@id/operatorLogoIcon_org" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo_org" />
            <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:paddingBottom="@dimen/notification_icon_bottom_margin" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
        </LinearLayout>
        <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" systemui:ampmSmall="true" />
        </LinearLayout>
        <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:alpha="@dimen/system_icon_area_alpha">
            <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <LinearLayout android:gravity="right|center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                <TextView android:textSize="@dimen/status_bar_battery_text_size" android:textColor="#ffffffff" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
                <ImageView android:gravity="center" android:id="@id/battery" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="4.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:textColor="#ffffffff" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:textColor="#ffffffff" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
        </com.android.systemui.statusbar.phone.TickerView>
    </LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>

Will try to add date also soon
Enjoy...
 

ddavtian

Senior Member
Apr 17, 2007
491
118
San Francisco Bay Area
Or use Wanam xposed and select "center":

pe3u5equ.jpg
 
Last edited:

CiDev

Senior Member
Nov 25, 2013
97
62
center clock

Your approach is fine for people who know what they are doing.
I'm good with xposed :)
I understand, but I'm making a rom for my daughter who's 6 years old,so I avoid dangerous apps for my kid.
now can you tell me maby if there's already a transparent weather widget posted cause I'm working on that one, so don't feel like posting what already is out.
thx
 

CiDev

Senior Member
Nov 25, 2013
97
62
center clock

Ur six year old gets a note 10.1 2014, goshhhhh lucckkyyyyyyy.

Sent from my SGH-T889 using XDA Premium 4 mobile app
lol, to be true, I ordered the tablet on firm name, no taks so price was ok, and she's all I got so do everything for my little princes. think every father will understand me.
anyway, will do my best to post some mod stuff here, but tablets are so hard to do...

Cheers
 

GeorgeP

Senior Member
Sep 19, 2007
413
130
lol, to be true, I ordered the tablet on firm name, no taks so price was ok, and she's all I got so do everything for my little princes. think every father will understand me.
anyway, will do my best to post some mod stuff here, but tablets are so hard to do...

Cheers

As a father of a 4 year old daughter I can definitely understand! She is my little princess and I want to do everything for her. I do try to hold back so as not to spoil her though, so I gave her an old iPad instead of an N10.1 2014. :laugh:
 

CiDev

Senior Member
Nov 25, 2013
97
62
Dad

Thx for understanding my friend.
Its hard not to spoil them, but I also gave this cause Its an extra for her general education and development (sorry if my words are wrong)
and she beats almost everyone with SubwaySurfers :p
 

GeorgeP

Senior Member
Sep 19, 2007
413
130
Thx for understanding my friend.
Its hard not to spoil them, but I also gave this cause Its an extra for her general education and development (sorry if my words are wrong)
and she beats almost everyone with SubwaySurfers :p

I agree. My daughter has gotten very good at Angry Birds. I figure that is giving her an early introduction to Newtonian physics. :laugh:
But yes, there are also a lot of good educational apps she likes, so that's good.
 

CiDev

Senior Member
Nov 25, 2013
97
62
Good Advice

I agree. My daughter has gotten very good at Angry Birds. I figure that is giving her an early introduction to Newtonian physics. :laugh:
But yes, there are also a lot of good educational apps she likes, so that's good.
Hey G.
If I may give you 1 good advice.
As you're prinnces is 4, DON'T play against her over 2 years cause she will floor you, (believe me, you get used to it) lol
sheers Bro
liked the talk talk..