Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b86383e authored by Sherry Zhou's avatar Sherry Zhou Committed by Automerger Merge Worker
Browse files

Merge "Use fixed height for small clock view position large clock" into udc-dev am: e798caa7

parents 17bad4a2 e798caa7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -28,9 +28,10 @@
    <FrameLayout
        android:id="@+id/lockscreen_clock_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_height="@dimen/small_clock_height"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:clipChildren="false"
        android:paddingStart="@dimen/clock_padding_start"
        android:visibility="invisible" />
    <FrameLayout
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
    <dimen name="num_pad_key_margin_end">12dp</dimen>

    <!-- additional offset for clock switch area items -->
    <dimen name="small_clock_height">114dp</dimen>
    <dimen name="clock_padding_start">28dp</dimen>
    <dimen name="below_clock_padding_start">32dp</dimen>
    <dimen name="below_clock_padding_end">16dp</dimen>
+7 −0
Original line number Diff line number Diff line
@@ -390,6 +390,13 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
            PropertyAnimator.setProperty(mStatusArea, AnimatableProperty.TRANSLATION_X,
                    x, props, animate);
        }

    }

    void updateKeyguardStatusViewOffset() {
        // updateClockTargetRegions will call onTargetRegionChanged
        // which will require the correct translationY property of keyguardStatusView after updating
        mView.updateClockTargetRegions();
    }

    /**
+4 −0
Original line number Diff line number Diff line
@@ -172,11 +172,15 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
     * Update position of the view with an optional animation
     */
    public void updatePosition(int x, int y, float scale, boolean animate) {
        float oldY = mView.getY();
        PropertyAnimator.setProperty(mView, AnimatableProperty.Y, y, CLOCK_ANIMATION_PROPERTIES,
                animate);

        mKeyguardClockSwitchController.updatePosition(x, scale, CLOCK_ANIMATION_PROPERTIES,
                animate);
        if (oldY != y) {
            mKeyguardClockSwitchController.updateKeyguardStatusViewOffset();
        }
    }

    /**