diff options
author | Yuling Liang <yulingliang@google.com> | 2014-04-25 17:38:00 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-25 17:38:00 +0000 |
commit | 2be1f8c3f4d338c7b7c73bb642bc410ef27c8ee4 (patch) | |
tree | 52a10f7d487426934424e62c9ca7f134dfd3f9e2 /core/java/android/text | |
parent | d8e6a5f18a58a4229324733debce7e3e4d54b2f8 (diff) | |
parent | 69a9d92502428a4cf6eb6b5bf6577d9e525796a2 (diff) | |
download | frameworks_base-2be1f8c3f4d338c7b7c73bb642bc410ef27c8ee4.zip frameworks_base-2be1f8c3f4d338c7b7c73bb642bc410ef27c8ee4.tar.gz frameworks_base-2be1f8c3f4d338c7b7c73bb642bc410ef27c8ee4.tar.bz2 |
am 69a9d925: am eea94f06: Merge "Revert "Followon fix for 14276128 Clipping at bottom of TextView"" into klp-modular-dev
* commit '69a9d92502428a4cf6eb6b5bf6577d9e525796a2':
Revert "Followon fix for 14276128 Clipping at bottom of TextView"
Diffstat (limited to 'core/java/android/text')
-rw-r--r-- | core/java/android/text/StaticLayout.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java index 0db00f0..f7ac75a 100644 --- a/core/java/android/text/StaticLayout.java +++ b/core/java/android/text/StaticLayout.java @@ -632,11 +632,7 @@ public class StaticLayout extends Layout { bottom = fm.bottom; } - boolean firstLine = (j == 0); - boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount); - boolean lastLine = currentLineIsTheLastVisibleOne || (end == bufEnd); - - if (firstLine) { + if (j == 0) { if (trackPad) { mTopPadding = top - above; } @@ -645,10 +641,7 @@ public class StaticLayout extends Layout { above = top; } } - - int extra; - - if (lastLine) { + if (end == bufEnd) { if (trackPad) { mBottomPadding = bottom - below; } @@ -658,8 +651,9 @@ public class StaticLayout extends Layout { } } + int extra; - if (needMultiply && !lastLine) { + if (needMultiply && end != bufEnd) { double ex = (below - above) * (spacingmult - 1) + spacingadd; if (ex >= 0) { extra = (int)(ex + EXTRA_ROUNDING); @@ -696,6 +690,8 @@ public class StaticLayout extends Layout { if (ellipsize != null) { // If there is only one line, then do any type of ellipsis except when it is MARQUEE // if there are multiple lines, just allow END ellipsis on the last line + boolean firstLine = (j == 0); + boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount); boolean forceEllipsis = moreChars && (mLineCount + 1 == mMaximumVisibleLineCount); boolean doEllipsis = |