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

Commit 1503f739 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am e1e0dc8e: Make sure we relayout the TextView when the text changes and marquee is enabled.

Merge commit 'e1e0dc8e' into eclair-mr2

* commit 'e1e0dc8e':
  Make sure we relayout the TextView when the text changes and marquee is enabled.
parents f035b477 e1e0dc8e
Loading
Loading
Loading
Loading
+18 −16
Original line number Diff line number Diff line
@@ -3964,8 +3964,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                    mHighlightPath = new Path();

                if (selStart == selEnd) {
                    if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK)
                        < BLINK) {
                    if ((SystemClock.uptimeMillis() - mShowCursor) % (2 * BLINK) < BLINK) {
                        if (mHighlightPathBogus) {
                            mHighlightPath.reset();
                            mLayout.getCursorPath(selStart, mHighlightPath, mText);
@@ -5344,8 +5343,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
             * will happen at measure).
             */
            makeNewLayout(want, hintWant, UNKNOWN_BORING, UNKNOWN_BORING,
                          mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(), false);
                          mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(),
                          false);

            if (mEllipsize != TextUtils.TruncateAt.MARQUEE) {
                // In a fixed-height view, so use our new text layout.
                if (mLayoutParams.height != LayoutParams.WRAP_CONTENT &&
                    mLayoutParams.height != LayoutParams.FILL_PARENT) {
@@ -5360,6 +5361,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                    invalidate();
                    return;
                }
            }

            // We lose: the height has changed and we have a dynamic height.
            // Request a new view layout using our new text layout.