diff options
| author | 2011-11-11 15:30:16 -0800 | |
|---|---|---|
| committer | 2011-11-11 15:30:16 -0800 | |
| commit | 033a001a612c7349c35198561e095350182deb34 (patch) | |
| tree | 5b29b76048fcc0536db807516a4962677f163be4 | |
| parent | caa8c06de5f94db69faca35d666c04b82d3f420b (diff) | |
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 caa8c06de5f94db69faca35d666c04b82d3f420b
| -rw-r--r-- | core/java/android/widget/TextView.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index ef2d83b0e6e5..55e49ea067f8 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -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; |