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

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

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

Merge "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."
parents 7a8e78f4 033a001a
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -6099,18 +6099,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        int physicalWidth = width;
        int physicalWidth = width;


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


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


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

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


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


        int hintWant = want;
        int hintWant = want;
        int hintWidth = (mHintLayout == null) ? hintWant : mHintLayout.getWidth();
        int hintWidth = (mHintLayout == null) ? hintWant : mHintLayout.getWidth();
@@ -11546,6 +11541,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    private boolean                 mHighlightPathBogus = true;
    private boolean                 mHighlightPathBogus = true;
    private static final RectF      sTempRect = new RectF();
    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        BLINK = 500;


    private static final int ANIMATED_SCROLL_GAP = 250;
    private static final int ANIMATED_SCROLL_GAP = 250;