Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,814,393 Members 52,770 Now Online
XDA Developers Android and Mobile Development Forum

center clock and how to

Tip us?
 
CiDev
Old
#1  
CiDev's Avatar
Member - OP
Thanks Meter 59
Posts: 88
Join Date: Nov 2013
Default center clock and how to

This is for who"s on XXUBMJ6 firmware

download here:
https://www.dropbox.com/s/zke597pq8f...ck_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
Old
(Last edited by ddavtian; 6th March 2014 at 06:20 PM.)
#2  
Senior Member
Thanks Meter 110
Posts: 463
Join Date: Apr 2007
Location: San Francisco Bay Area
Or use Wanam xposed and select "center":

 
CiDev
Old
#3  
CiDev's Avatar
Member - OP
Thanks Meter 59
Posts: 88
Join Date: Nov 2013
Default center clock

Quote:
Originally Posted by ddavtian View Post
Or use Wanam xposed and select "center":

Yes, 4 sure, maby I'm to old school like to do it to save space.
 
ddavtian
Old
#4  
Senior Member
Thanks Meter 110
Posts: 463
Join Date: Apr 2007
Location: San Francisco Bay Area
Your approach is fine for people who know what they are doing.
I'm good with xposed
 
CiDev
Old
#5  
CiDev's Avatar
Member - OP
Thanks Meter 59
Posts: 88
Join Date: Nov 2013
Default center clock

Quote:
Originally Posted by ddavtian View Post
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
 
moabizzi
Old
#6  
moabizzi's Avatar
Senior Member
Thanks Meter 177
Posts: 601
Join Date: Feb 2008
Location: Marlboro NJ

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

Sent from my SGH-T889 using XDA Premium 4 mobile app
 
CiDev
Old
#7  
CiDev's Avatar
Member - OP
Thanks Meter 59
Posts: 88
Join Date: Nov 2013
Default center clock

Quote:
Originally Posted by moabizzi View Post
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
Old
#8  
Senior Member
Thanks Meter 88
Posts: 302
Join Date: Sep 2007
Quote:
Originally Posted by CiDev View Post
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.
 
CiDev
Old
#9  
CiDev's Avatar
Member - OP
Thanks Meter 59
Posts: 88
Join Date: Nov 2013
Default 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
 
GeorgeP
Old
#10  
Senior Member
Thanks Meter 88
Posts: 302
Join Date: Sep 2007
Quote:
Originally Posted by CiDev View Post
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
I agree. My daughter has gotten very good at Angry Birds. I figure that is giving her an early introduction to Newtonian physics.
But yes, there are also a lot of good educational apps she likes, so that's good.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA Xposed Tuesday: How to Shut Up Your Phone – XDA Developer TV

So many different applications want to send us notifications that … more

Add Some Power to First Generation Snapdragon CPUs

Some older devices still remain very popular. Phones like theHTC Desire, Sony Ericsson … more

Android M Mentions Spotted in Android Code Review

While we are still waiting for Android L to be officially released, the first mentions of … more

Create a Simple Custom Launcher from Scratch

When you are starting your journey intoany sort of development, it’s never easy at the … more