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

Commit ec544d49 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Update clock position" into tm-dev am: 404e0450

parents 4c7e286a 404e0450
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -169,6 +169,18 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie
        mStatusBarStateController.removeCallback(mStatusBarStateListener);
        mStatusBarStateController.removeCallback(mStatusBarStateListener);
    }
    }


    /**
     * @return the number of pixels below the baseline. For fonts that support languages such as
     * Burmese, this space can be significant.
     */
    public float getBottom() {
        if (mView.getPaint() != null && mView.getPaint().getFontMetrics() != null) {
            return mView.getPaint().getFontMetrics().bottom;
        }

        return 0f;
    }

    /** Animate the clock appearance */
    /** Animate the clock appearance */
    public void animateAppear() {
    public void animateAppear() {
        if (!mIsDozing) mView.animateAppearOnLockscreen();
        if (!mIsDozing) mView.animateAppearOnLockscreen();
+2 −2
Original line number Original line Diff line number Diff line
@@ -301,8 +301,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS


    private void updateClockLayout() {
    private void updateClockLayout() {
        int largeClockTopMargin = getContext().getResources().getDimensionPixelSize(
        int largeClockTopMargin = getContext().getResources().getDimensionPixelSize(
                R.dimen.keyguard_large_clock_top_margin);
                R.dimen.keyguard_large_clock_top_margin)

                - (int) mLargeClockViewController.getBottom();
        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(MATCH_PARENT,
        RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(MATCH_PARENT,
                MATCH_PARENT);
                MATCH_PARENT);
        lp.topMargin = largeClockTopMargin;
        lp.topMargin = largeClockTopMargin;