summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorYuling Liang <yulingliang@google.com>2014-04-25 17:35:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-25 17:35:52 +0000
commit69a9d92502428a4cf6eb6b5bf6577d9e525796a2 (patch)
tree079557d3bcec799bbbe951583fb84d3adf5e3877 /core/java/android
parent60f8349b9819130e81e28106a35bf3362d337045 (diff)
parenteea94f060a917a5c6195a81d8825551a430a8d69 (diff)
downloadframeworks_base-69a9d92502428a4cf6eb6b5bf6577d9e525796a2.zip
frameworks_base-69a9d92502428a4cf6eb6b5bf6577d9e525796a2.tar.gz
frameworks_base-69a9d92502428a4cf6eb6b5bf6577d9e525796a2.tar.bz2
am eea94f06: Merge "Revert "Followon fix for 14276128 Clipping at bottom of TextView"" into klp-modular-dev
* commit 'eea94f060a917a5c6195a81d8825551a430a8d69': Revert "Followon fix for 14276128 Clipping at bottom of TextView"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/text/StaticLayout.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 814326c..1f32d4d 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -633,11 +633,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;
}
@@ -646,10 +642,7 @@ public class StaticLayout extends Layout {
above = top;
}
}
-
- int extra;
-
- if (lastLine) {
+ if (end == bufEnd) {
if (trackPad) {
mBottomPadding = bottom - below;
}
@@ -659,8 +652,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);
@@ -697,6 +691,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 =