diff options
| author | Gilles Debunne <debunne@google.com> | 2011-02-01 10:09:29 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2011-02-01 10:09:29 -0800 |
| commit | 15f16e3f860b28ef0767b08ae8d86dc08b6aac3b (patch) | |
| tree | 7fc63c8967b4020b532ba1e08f7a4297b650d3dd /core/java/android/widget | |
| parent | 87793907c4c6cf6c0e96628c1b2d2555a5290af9 (diff) | |
| parent | 6538329258ee01b27586d8b0e46e96160d719a68 (diff) | |
| download | frameworks_base-15f16e3f860b28ef0767b08ae8d86dc08b6aac3b.zip frameworks_base-15f16e3f860b28ef0767b08ae8d86dc08b6aac3b.tar.gz frameworks_base-15f16e3f860b28ef0767b08ae8d86dc08b6aac3b.tar.bz2 | |
am 65383292: am 8f8aac5e: Merge "Pixel were missing on the last line of text when using MaxLines." into honeycomb
* commit '6538329258ee01b27586d8b0e46e96160d719a68':
Pixel were missing on the last line of text when using MaxLines.
Diffstat (limited to 'core/java/android/widget')
| -rw-r--r-- | core/java/android/widget/TextView.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 8cb725a..772eefd 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -5861,6 +5861,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } desired += pad; + layout.setMaximumVisibleLineCount(0); if (mMaxMode == LINES) { /* @@ -5869,8 +5870,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ if (cap) { if (linecount > mMaximum) { - desired = layout.getLineTop(mMaximum) + - layout.getBottomPadding(); + layout.setMaximumVisibleLineCount(mMaximum); + desired = layout.getLineTop(mMaximum); if (dr != null) { desired = Math.max(desired, dr.mDrawableHeightLeft); @@ -6438,7 +6439,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (applyTransformation) { setTransformationMethod(SingleLineTransformationMethod.getInstance()); } - // TODO setState } else { if (changeMaxLines) { setMaxLines(Integer.MAX_VALUE); @@ -6447,7 +6447,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (applyTransformation) { setTransformationMethod(null); } - // TODO setState } } |
