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

Commit 033a001a authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Seems to break text views all over. Particularly noticeable is that the...

Seems to break text views all over.  Particularly noticeable is that the labels in launcher icons appear left-justified.  Multi-line text fields also wrap after every character.

Revert "Fix bug #5387832 [UI/Visual] Address of the website is not displayed properly(second line of the address is partly shown)"

This reverts commit caa8c06d
parent caa8c06d
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -6081,18 +6081,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        int physicalWidth = width;

        if (mHorizontallyScrolling) {
            width = getTextWidth();
            width = VERY_WIDE;
        }

        makeNewLayout(width, physicalWidth, UNKNOWN_BORING, UNKNOWN_BORING,
                      physicalWidth, false);
    }

    private int getTextWidth() {
        final int length = mText.length();
        return (length == 0) ? 0 : (int) (getPaint().measureText(mText, 0, length) + 0.5f);
    }

    @Override
    protected void resetResolvedLayoutDirection() {
        super.resetResolvedLayoutDirection();
@@ -6538,7 +6533,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        int want = width - getCompoundPaddingLeft() - getCompoundPaddingRight();
        int unpaddedWidth = want;

        if (mHorizontallyScrolling) want = getTextWidth();
        if (mHorizontallyScrolling) want = VERY_WIDE;

        int hintWant = want;
        int hintWidth = (mHintLayout == null) ? hintWant : mHintLayout.getWidth();
@@ -11596,6 +11591,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    private boolean                 mHighlightPathBogus = true;
    private static final RectF      sTempRect = new RectF();

    // XXX should be much larger
    private static final int        VERY_WIDE = 1024*1024;

    private static final int        BLINK = 500;

    private static final int ANIMATED_SCROLL_GAP = 250;