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

Commit f3a7691c authored by Matt Pietal's avatar Matt Pietal
Browse files

PIN Bouncer: Fix margins

Margins were being added, but not always processed in time for
layout. Apply margins earlier.

Fixes: 178359464
Test: manual
Change-Id: I4f4a77abd36c529000ccca58887b02a852640275
parent c8d8b7cd
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -156,9 +156,14 @@ public class NumPadKey extends ViewGroup {
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        mAnimator.updateMargin((ViewGroup.MarginLayoutParams) getLayoutParams());
    public void setLayoutParams(ViewGroup.LayoutParams params) {
        mAnimator.updateMargin((ViewGroup.MarginLayoutParams) params);

        super.setLayoutParams(params);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        measureChildren(widthMeasureSpec, heightMeasureSpec);