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

Commit f179aa3e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure CalculatorText is at least as wide as it's container" into ub-calculator-calculus

parents 47cb76b2 f3076c89
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -138,10 +138,16 @@ public class CalculatorText extends AlignedTextView implements View.OnLongClickL
            // Prevent shrinking/resizing with our variable textSize.
            setTextSizeInternal(TypedValue.COMPLEX_UNIT_PX, mMaximumTextSize,
                    false /* notifyListener */);
            setMinHeight(getLineHeight() + getCompoundPaddingBottom()
            setMinimumHeight(getLineHeight() + getCompoundPaddingBottom()
                    + getCompoundPaddingTop());
        }

        // Ensure we are at least as big as our parent.
        final int width = MeasureSpec.getSize(widthMeasureSpec);
        if (getMinimumWidth() != width) {
            setMinimumWidth(width);
        }

        // Re-calculate our textSize based on new width.
        mWidthConstraint = MeasureSpec.getSize(widthMeasureSpec)
                - getPaddingLeft() - getPaddingRight();