FORUMS
Remove All Ads from XDA

[MOD] Lockscreen Mod, including SystemUI changes

690 posts
Thanks Meter: 747
 
By shaftenberg, Senior Member on 11th April 2013, 11:44 PM
Post Reply Email Thread
17th April 2013, 07:55 AM |#21  
HSD-Pilot's Avatar
Senior Member
Flag NRW
Thanks Meter: 2,483
 
More
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

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
 
 
17th April 2013, 08:30 AM |#22  
Senior Member
Thanks Meter: 231
 
More
Question 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>
17th April 2013, 10:26 AM |#23  
ro_explorer's Avatar
Senior Member
Flag Stockholm
Thanks Meter: 684
 
More
V2.0 works perfectly over here ...

Thanks a lot.
17th April 2013, 03:20 PM |#24  
Senior Member
Thanks Meter: 231
 
More
Quote:
Originally Posted by arman68

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: 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:Click image for larger version

Name:	Screenshot_2013-04-17-16-17-43.png
Views:	229
Size:	9.9 KB
ID:	1890540
The Following User Says Thank You to arman68 For This Useful Post: [ View ] Gift arman68 Ad-Free
17th April 2013, 03:45 PM |#25  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 747
 
More
Quote:
Originally Posted by arman68

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>
    <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" />    
    <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
17th April 2013, 03:55 PM |#26  
Senior Member
Nantes
Thanks Meter: 64
 
More
Quote:
Originally Posted by arman68

Got it working at last: 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:Attachment 1890540

That's a great news !!!!!
17th April 2013, 04:07 PM |#27  
Senior Member
Thanks Meter: 231
 
More
Quote:
Originally Posted by shaftenberg

Maybe you don't want to let me die dumb, please post the code

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>
The Following User Says Thank You to arman68 For This Useful Post: [ View ] Gift arman68 Ad-Free
17th April 2013, 06:55 PM |#28  
Senior Member
Flag São Paulo
Thanks Meter: 32
 
More
Thanks! it looks perfect! well done man.
18th April 2013, 01:42 AM |#29  
zheka99's Avatar
Senior Member
Flag Leipzig
Thanks Meter: 19
 
More
very nice. thank you. and 1% battery mod works, too. like it
18th April 2013, 10:23 PM |#30  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 747
 
More
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>
18th April 2013, 11:10 PM |#31  
avedeacero's Avatar
Member
Flag MMHO
Thanks Meter: 31
 
More
Good work, maybe you can center the clock and information in lockscreen?
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