FORUMS
Remove All Ads from XDA

[Guide-Lollipop]Clock center status bar.

383 posts
Thanks Meter: 1,118
 
By thanhfhuongf, Senior Member on 31st December 2014, 06:55 AM
Post Reply Email Thread

For android 5.0
SystemUI.apk\res\layout\status_bar.xml
search
PHP Code:
        <com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <include 
layout="@layout/system_icons" />
            <
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:alpha="0.74" android:paddingStart="7.0dip" />
        </
com.android.keyguard.AlphaOptimizedLinearLayout
Change to
PHP Code:
        <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:alpha="0.74" android:paddingStart="7.0dip" />
        <
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:layout_alignParentRight="true" android:alpha="0.8">
            <
com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent">
                <include 
layout="@layout/system_icons" />
            </
com.android.keyguard.AlphaOptimizedLinearLayout>
        </
LinearLayout
The Following 39 Users Say Thank You to thanhfhuongf For This Useful Post: [ View ] Gift thanhfhuongf Ad-Free
 
 
31st December 2014, 07:42 AM |#2  
muhammadsultan's Avatar
Senior Member
Thanks Meter: 115
 
More
can you make file and upload it
31st December 2014, 07:58 AM |#3  
Member
Thanks Meter: 33
 
More
Question
Thank you for the great steps! Do you know how to remove AM/PM from the clock like AOSP?
And since the new Lollipop status bar icons are drawn by xml codes as seen in AOSP SystemUI drawables, how do we make those codes work on our Touchwiz Lollipop status bar, so we can have the beautiful AOSP Lollipop status bar icons as opposed to the old TW ones?
Cam on! Thank you!

Quote:
Originally Posted by muhammadsultan

can you make file and upload it

The steps are for your own DIY modding of your SystemUI.apk. You have to decompile it, mod the files he had shown above, compile it, then push into your system/priv-app/SystemUI/ and reboot. Voila!
To decompile/compile stuffs, just follow the Theming 101 Guide by Bubbajoe40356 in this subforum.
31st December 2014, 11:48 AM |#4  
thereassaad's Avatar
Recognized Contributor
Flag Bierut
Thanks Meter: 9,625
 
More
As always @thanhfhuongf u doing the best & great work thanks

HAPPY NEW YEAR From thereassaad to ALL
The Following User Says Thank You to thereassaad For This Useful Post: [ View ] Gift thereassaad Ad-Free
31st December 2014, 03:44 PM |#5  
drlupinxx's Avatar
Member
Thanks Meter: 9
 
More
Thumbs up
you can put off screen clock button?
PHP Code:
<FrameLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
            <
com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
            <
com.android.systemui.statusbar.policy.KeyButtonView android:gravity="center" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/bloqueo" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
        </
FrameLayout

I got it as well but I moved a little clock on the left
if you could center the clock inside the box would be great because they put button next to the battery mars multiwindow

I put the full code if you see something wrong

PHP 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"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:id="@id/call_background" android:layout_width="fill_parent" android:layout_height="fill_parent" />
    <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.systemui.statusbar.AlphaOptimizedFrameLayout 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="0.74">
            <com.android.keyguard.AlphaOptimizedLinearLayout android:id="@id/notification_icon_area_inner" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <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.policy.KeyButtonView android:id="@id/home" android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/gi_icono_off" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_home" systemui:keyCode="187" />
                <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.systemui.statusbar.AlphaOptimizedFrameLayout>
        <FrameLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
            <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
            <com.android.systemui.statusbar.policy.KeyButtonView android:gravity="center" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/bloqueo" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
        </FrameLayout>
        <com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center|right" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
            <include layout="@layout/system_icons" />
        </com.android.keyguard.AlphaOptimizedLinearLayout>
    </LinearLayout>
    <ViewStub android:id="@id/ticker_stub" android:layout="@layout/status_bar_ticker" android:inflatedId="@id/ticker" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>


hopefully you can help
Merry Christmas and Happy New Year
1st January 2015, 02:52 AM |#6  
thanhfhuongf's Avatar
OP Senior Member
Flag Viet Nam
Thanks Meter: 1,118
 
Donate to Me
More
Quote:
Originally Posted by drlupinxx

you can put off screen clock button?

PHP Code:
<FrameLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
            <
com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
            <
com.android.systemui.statusbar.policy.KeyButtonView android:gravity="center" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/bloqueo" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
        </
FrameLayout

I got it as well but I moved a little clock on the left
if you could center the clock inside the box would be great because they put button next to the battery mars multiwindow

I put the full code if you see something wrong

PHP 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"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:id="@id/call_background" android:layout_width="fill_parent" android:layout_height="fill_parent" />
    <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.systemui.statusbar.AlphaOptimizedFrameLayout 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="0.74">
            <com.android.keyguard.AlphaOptimizedLinearLayout android:id="@id/notification_icon_area_inner" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <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.policy.KeyButtonView android:id="@id/home" android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/gi_icono_off" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_home" systemui:keyCode="187" />
                <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.systemui.statusbar.AlphaOptimizedFrameLayout>
        <FrameLayout android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
            <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
            <com.android.systemui.statusbar.policy.KeyButtonView android:gravity="center" android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/bloqueo" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
        </FrameLayout>
        <com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center|right" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
            <include layout="@layout/system_icons" />
        </com.android.keyguard.AlphaOptimizedLinearLayout>
    </LinearLayout>
    <ViewStub android:id="@id/ticker_stub" android:layout="@layout/status_bar_ticker" android:inflatedId="@id/ticker" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>


hopefully you can help
Merry Christmas and Happy New Year

add this code
Code:
    <FrameLayout android:id="@id/call_background" android:layout_width="fill_parent" android:layout_height="fill_parent" />
    <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.systemui.statusbar.AlphaOptimizedFrameLayout 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="0.74">
            <com.android.keyguard.AlphaOptimizedLinearLayout android:id="@id/notification_icon_area_inner" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <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:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentStart="true" />
            </com.android.keyguard.AlphaOptimizedLinearLayout>
        </com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
		<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:alpha="0.74" android:paddingStart="7.0dip" />
        <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:layout_alignParentRight="true" android:alpha="0.8">
			<com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent">
				<include layout="@layout/system_icons" />
			</com.android.keyguard.AlphaOptimizedLinearLayout>
        </LinearLayout>
    </LinearLayout>
    <com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center" android:id="@id/back" android:layout_width="60.0dip" android:layout_height="fill_parent" android:src="#00000000" android:layout_toRightOf="@id/recent_apps" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:keyRepeat="false" androidundefinedrientation="vertical" />
    <ViewStub android:id="@id/ticker_stub" android:layout="@layout/status_bar_ticker" android:inflatedId="@id/ticker" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
you can move to left or right
Code:
android:layout_gravity="center"
The Following 2 Users Say Thank You to thanhfhuongf For This Useful Post: [ View ] Gift thanhfhuongf Ad-Free
1st January 2015, 03:24 AM |#7  
drlupinxx's Avatar
Member
Thanks Meter: 9
 
More

Thank you, now if i stay focused and works perfectly.
Happy 2015!!!
Thanks heart
The Following 2 Users Say Thank You to drlupinxx For This Useful Post: [ View ] Gift drlupinxx Ad-Free
10th January 2015, 08:42 PM |#8  
Senior Member
Flag amman
Thanks Meter: 871
 
More
@thanhfhuongf can you give me the tool you use to decompile im always having errors with mine idk why
11th January 2015, 12:27 AM |#9  
agabey_42's Avatar
Senior Member
Flag Ankara
Thanks Meter: 554
 
More
where is download link please.
11th January 2015, 02:20 AM |#10  
thanhfhuongf's Avatar
OP Senior Member
Flag Viet Nam
Thanks Meter: 1,118
 
Donate to Me
More
Quote:
Originally Posted by Warnahly

@thanhfhuongf can you give me the tool you use to decompile im always having errors with mine idk why


http://forum.xda-developers.com/show....php?t=2639400




Quote:
Originally Posted by agabey_42

where is download link please.

http://samsungviet.vn/index.php?threads/2241/

[Mod-Lollipop]N9005 + D vĂ  J - XXUGBNL8 Android 5.0
SystemUI mod V3 with network in out
The Following User Says Thank You to thanhfhuongf For This Useful Post: [ View ] Gift thanhfhuongf Ad-Free
11th January 2015, 03:45 AM |#11  
Senior Member
Flag Antalya
Thanks Meter: 75
 
More
thank for your guide mate.

if anybody want edited file, use my attachment. its for n900xxuebnl4

https://mega.co.nz/#!OlQACTSQ!82dDpu...Z8LpajfmnPi8xQ
The Following 3 Users Say Thank You to hakan_710 For This Useful Post: [ View ] Gift hakan_710 Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes