[MOD] Lockscreen Mod, including SystemUI changes

HSD-Pilot

Senior Member
Jan 22, 2012
3,484
2,416
0
NRW
I replaced the framework in the AOSP Pack with yours (Lockscreen) . The Moto Cam is included in all available Roms, so there shouldn't be any Problem ;)
If something goes wrong, I'm the Bad Guy :D

Edit: Of course I tested the download Zip again (currently on Omars Rom), I won't let it online if I had any issues. I usually have to fix the Phones, in case something goes wrong ;)

Gesendet von meinem XT890 mit Tapatalk 2
 
Last edited:

arman68

Senior Member
Sep 22, 2006
286
230
0
Help request with center clock

@shaftenberg: Since you have done such a great job, I would like to use your SystemUI mods as a base. I am trying to change to be centered (changing /res/layout/status_bar.xml). I have tried a few different approaches, but none is quite right. Would you mind looking at what I am doing and pointing me in the right direction?

Method 1, "top level clock": added the following lines at the top, before the first LinearLayout. It works and looks just as I want, but the clock does not disappear during ticker events:
Code:
        <com.android.systemui.statusbar.policy.Clock
                android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:id="@id/clock"
                android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
Method 2, "RelativeLayout": find the first "LinearLayout Area", remove everything between the 2 LinearLayout tags (only the first one, not the ticker ones), and replace with the following lines. It works, but the right icon group is all messed up, with the signal cluster having wrong vertical alignment and missing left and right padding. Is is because of the changes you made to the signal cluster?
Code:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
        <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:layout_alignParentLeft="true"
                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:id="@id/notificationIcons" android:layout_toRightOf="@id/moreIcon" 
                android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
        <ImageView android:id="@id/battery" android:layout_alignParentRight="true"
                android:layout_width="wrap_content" android:layout_height="wrap_content" />
        <include android:id="@id/signal_cluster" android:layout_toLeftOf="@id/battery"
                android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
        <LinearLayout android:orientation="horizontal" android:id="@id/statusIcons" android:layout_toLeftOf="@id/signal_cluster"
                android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center_vertical" />
</RelativeLayout>
Method 3, "new clock LinearLayout section": added the following lines, before the line with @id/statusIcons. Clock is not centered, still part of the right icon block, but on the left of it.
Code:
<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:textAppearance="@style/TextAppearance.StatusBar.Clock"
                android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
 

arman68

Senior Member
Sep 22, 2006
286
230
0
I am trying to change the clock to be centered (changing /res/layout/status_bar.xml). I have tried a few different approaches, but none is quite right.
Got it working at last: :victory: Man, for such a simple thing, it was pretty hard to figure out...

This will go in the next version AIO mod, with 1% battery icons. I still have quite a few other changes to do before the release though. In the meantime, here is a screenshot:Screenshot_2013-04-17-16-17-43.png
 
Last edited:
  • Like
Reactions: crubbish

shaftenberg

Senior Member
Jul 31, 2010
690
738
0
Cologne
Is is because of the changes you made to the signal cluster?
Definitely no.
I did something, this works, but ticker text overlaps the clock... :)

Haven't got much time now, can look deeper in it tomorrow.
I moved the clock line, changed "wrap_content" to "fill_parent" and it works. Maybe that's a step for you:

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/notification_lights_out" android:paddingLeft="6.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/icons" android:paddingLeft="6.0dip" android:paddingRight="6.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">
            <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_alignParentLeft="true" />
        </LinearLayout>
        <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
        <LinearLayout android:gravity="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" />
            <ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
        </LinearLayout>
    </LinearLayout>
[COLOR="Red"]    <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" /> [/COLOR]   
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.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="center" />
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" 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:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" 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>
[edit]
I was too late sorry.
Maybe you don't want to let me die dumb, please post the code :D
 
Last edited:

arman68

Senior Member
Sep 22, 2006
286
230
0
Maybe you don't want to let me die dumb, please post the code :D
Given the changes you have made to the SystemUI and framework, that is definitely not going to happen. Here are my notes, for the centered clock:

Code:
We need to divide the statusbar inside <LinearLayout android:id="@id/icons"/> into 3 <LinearLayouts> using the existing android:id and define android:layout_weight:

1. edit /res/layout/status_bar.xml

2. remove existing clock definition (with android:id="@id/clock")

3. Existing <LinearLayout android:id="@id/notification_icon_area">
        define android:layout_weight="1.0" (it should already be there)

4. Create new <LinearLayout> with android:id="@id/clock" and unspecified android:layout_weight (ie: "0" by default)
        <LinearLayout android:id="@id/clock" android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" > 
            <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
        </LinearLayout>

5. Existing <LinearLayout android:id="@id/statusIcons">
        define android:layout_weight="1.0"
        define android:layout_width="0.0dip"
        define android:gravity="center|right"

6. Existing <LinearLayout android:id="@id/signal_battery_cluster">
        nest into the previous one with android:id="@id/statusIcons"
In addition, I was getting some funky background in the drop down notification clock area. I think it is now fixed:
Code:
In /res/layout/status_bar_expanded_header.xml replace existing line 2
        <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false"
        with
        <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" android:baselineAligned="false"
For completeness, here is my full status_bar.xml:
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/notification_lights_out" android:paddingLeft="6.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/icons" android:paddingLeft="6.0dip" android:paddingRight="6.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">
            <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_alignParentLeft="true" />
        </LinearLayout>
        <LinearLayout android:id="@id/clock" android:gravity="center" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" > 
            <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
        </LinearLayout>
        <LinearLayout android:gravity="center|right" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="0.0dip" android:layout_height="fill_parent"  android:layout_weight="1.0">
            <LinearLayout android:gravity="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" />
                <ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.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="center" />
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" 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:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" 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>
 
  • Like
Reactions: shaftenberg

shaftenberg

Senior Member
Jul 31, 2010
690
738
0
Cologne
Can someone help me?
What I want is to remove the carrier label on the lockscreen (this is easy) and put the lock circle more to the bottom (this is easy too) - BUT if the music widget appears, the lock circle moves down and cuts in half.

I'd like to get a fixed position for the lock circle, equal if music widget is visible or not. How can it be done? Anyone?

Here is the code of the bottom part:

Code:
    <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="left" android:id="@id/status1" android:layout_marginLeft="@dimen/secured_lockscreen_status_side_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
    <include android:id="@id/transport" android:layout_width="fill_parent" android:layout_height="80.0dip" android:layout_marginLeft="@dimen/secured_lockscreen_status_side_margin" android:layout_marginTop="6.0dip" android:layout_marginRight="@dimen/secured_lockscreen_status_side_margin" layout="@layout/keyguard_transport_control" />
    <RelativeLayout android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="380.0dip" android:layout_row="4">
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true">
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/moto_keyguard_lockscreen_statusview_textsize" android:textStyle="bold" android:textColor="?textColorSecondary" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/carrier" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="32.0dip" android:layout_marginBottom="6.0dip" android:singleLine="true" />
        </LinearLayout>
        <FrameLayout android:gravity="bottom" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="370.0dip">
            <com.android.internal.widget.multiwaveview.GlowPadView android:gravity="top" android:layout_gravity="center_horizontal" android:orientation="horizontal" android:id="@id/unlock_widget" android:focusable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:innerRadius="@dimen/glowpadview_inner_radius" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" android:directionDescriptions="@array/lockscreen_direction_descriptions" android:outerRingDrawable="@drawable/ic_lockscreen_outerring" android:pointDrawable="@drawable/ic_lockscreen_glowdot" android:glowRadius="@dimen/glowpadview_glow_radius" android:targetDrawables="@array/lockscreen_targets_with_camera" android:handleDrawable="@drawable/ic_lockscreen_handle" android:outerRadius="@dimen/glowpadview_target_placement_radius" android:vibrationDuration="20" android:snapMargin="@dimen/glowpadview_snap_margin" android:feedbackCount="1" />
        </FrameLayout>
    </RelativeLayout>
 

ajael44

Senior Member
Jun 12, 2008
524
86
0
Changé
Hey !

V2.0 is just amazing ! Very good job !

Could you make the same with center JB font clock with the bold hours ?

Like this :


Thx in advance !

Enjoy !
;)
 
Last edited:

shaftenberg

Senior Member
Jul 31, 2010
690
738
0
Cologne
Could you make the same with center JB font clock with the bold hours ?
Yes, i could do this, but I find this layout really annoying. One reason for me not to upgrade to 4.2 with my Nexus...
If you are firm with apktool, there's only small change in keyguard_screen_tab_unlock.xml, try it ;)
 

avedeacero

Member
Jan 23, 2012
48
31
0
MMHO
Hey !

V2.0 is just amazing ! Very good job !

Could you make the same with center JB font clock with the bold hours ?

Like this :


Thx in advance !

Enjoy !
;)
My friend shaftenberg, I appreciate the help to make the lockscreen look like the screenshoot. I'm not familiarized with the apktool, and in my attemps to install and decompile framework failed. Maybe you can share an explained tutorial. I've read http://forum.xda-developers.com/showthread.php?t=1891686 and I've used your files (apktool) shared a few post ago. I'm so sorry with my poor english, hope I explained. Thanks.
 

metalmoot

Senior Member
Oct 10, 2010
372
63
0
Nantes
Great mod, thanks for your time on that

I just want the clock to be centered in statutbar and it will be perfect

PS : true black instead of gradient blue is beautiful (and battery smooth as I understood)

Thanks again and keeping us to be proud of our Razr I

Sent From My Beaned Razr I