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

Commit 6e82029a authored by Andrei Stingaceanu's avatar Andrei Stingaceanu
Browse files

AutoSize TextView - fix transformation method

AutoSize now takes the text transformation method into
account when measuring the view.

Bug: 63889588
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t
android.widget.cts.TextViewTest#testAutoSizeCallers_setTransformationMethod

Change-Id: I52f4bf6ea2f45342efa04b742a9debdac69f9c4c
parent 7ef9f224
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -8341,7 +8341,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    }

    private boolean suggestedSizeFitsInSpace(int suggestedSizeInPx, RectF availableSpace) {
        final CharSequence text = getText();
        final CharSequence text = mTransformed != null
                ? mTransformed
                : getText();
        final int maxLines = getMaxLines();
        if (mTempTextPaint == null) {
            mTempTextPaint = new TextPaint();