[SUBSTRATUM] Bring the clock at right place

Renovatio33

Member
Oct 13, 2010
31
3
0
After Pie update, I was very upset about the clock that moved on the left of the status bar.
Inspired by this guide, I tried to make a razer compatible version.

I made an overlay for com.android.systemui/res/layout
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@*com.android.systemui:id/status_bar" android:background="@*com.android.systemui:drawable/system_bar_background" android:focusable="false" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="@*com.android.systemui:dimen/status_bar_height" android:accessibilityPaneTitle="@*com.android.systemui:string/status_bar"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <ImageView android:id="@*com.android.systemui:id/notification_lights_out" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@*com.android.systemui:dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@*com.android.systemui:drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:paddingStart="@*com.android.systemui:dimen/status_bar_padding_start" />
    <LinearLayout android:orientation="horizontal" android:id="@*com.android.systemui:id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="@*com.android.systemui:dimen/status_bar_padding_start" android:paddingEnd="@*com.android.systemui:dimen/status_bar_padding_end">
        <FrameLayout android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
            <include layout="@*com.android.systemui:layout/heads_up_status_bar_layout" />
            <LinearLayout android:id="@*com.android.systemui:id/status_bar_left_side" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:orientation="horizontal" android:id="@*com.android.systemui:id/notification_icon_area" android:clipChildren="false" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
            </LinearLayout>
        </FrameLayout>
        <android.widget.Space android:gravity="center" android:id="@*com.android.systemui:id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" />
        <com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@*com.android.systemui:id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent" >
            <include layout="@*com.android.systemui:layout/system_icons" />
            <android.widget.Space android:gravity="center" android:id="@*com.android.systemui:id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" />
            <com.android.systemui.statusbar.policy.Clock android:textAppearance="@*com.android.systemui:style/TextAppearance.Pie.StatusBar.Clock" android:gravity="start|center" android:id="@*com.android.systemui:id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="4.0dip" android:singleLine="true" />
        </com.android.keyguard.AlphaOptimizedLinearLayout>
    </LinearLayout>
    <ViewStub android:id="@*com.android.systemui:id/emergency_cryptkeeper_text" android:layout="@*com.android.systemui:layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
I got the correct style names from the SystemUi.apk decompiled directly from razer system directory; nevertheless, even though Substratum can compile and apply the overlay, it has no effect.

Any clue on what might I be missing?
 

jonchance_84

Senior Member
Aug 2, 2009
281
114
73
East Texas
I tried to use substratum too. Seems like Razer's own them engine gets in the way. As soon as we get TWRP, I assume there will be a stock based rom with all of that stripped out. For now I'm using gravity box to at least move it to the center. Left is dumb.
 

RKBD

Senior Member
Jun 20, 2016
707
1,004
113
koszalin
I tried to use substratum too. Seems like Razer's own them engine gets in the way. As soon as we get TWRP, I assume there will be a stock based rom with all of that stripped out. For now I'm using gravity box to at least move it to the center. Left is dumb.
but you can flash any gsi rom without twrp
 

jonchance_84

Senior Member
Aug 2, 2009
281
114
73
East Texas
you mean
clearing your data and typing in terminal
fastboot flash system_a "systemname".img
fastboot flash system_b "same systemname". img?
this is hard?
No. I just looked into it when I first got the phone. It was something new to me then, but not now. I'll look more into the different GSI ROMs. Which ones do you like?
 

roflkaapter

New member
Feb 29, 2016
3
0
0
It is possible to move the statusbar clock from the left side to the center or right side as desired. Doing so requires the installation of EdXposed (which passes SafetyNet!!! but is not yet compatible with every Xposed module) and the beta version of GravityBox [P].

Once EdXposed and GravityBox [P] beta are installed:

GravityBox [P] > Statusbar tweaks > Clock settings > Clock position (don't forget Clock position in header for the notification shade)
 

santimaster2000

Senior Member
Dec 25, 2009
374
96
48
Buenos Aires
It is possible to move the statusbar clock from the left side to the center or right side as desired. Doing so requires the installation of EdXposed (which passes SafetyNet!!! but is not yet compatible with every Xposed module) and the beta version of GravityBox [P].

Once EdXposed and GravityBox [P] beta are installed:

GravityBox [P] > Statusbar tweaks > Clock settings > Clock position (don't forget Clock position in header for the notification shade)
I can confirm that this works perfectly.
 
  • Like
Reactions: sandrshe