am 26a5c2dd: Merge "Followon fix for 14276128 Clipping at bottom of TextView" into klp-modular-dev
* commit '26a5c2dd740f309f3168790fc55a164738963835': Followon fix for 14276128 Clipping at bottom of TextView
This commit is contained in:
@@ -188,10 +188,6 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
|
|||||||
spacing = metrics.descent - metrics.ascent;
|
spacing = metrics.descent - metrics.ascent;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spacingmult != 1 || spacingadd != 0) {
|
|
||||||
spacing = (int)(spacing * spacingmult + spacingadd + 0.5f);
|
|
||||||
}
|
|
||||||
|
|
||||||
mBottom = spacing;
|
mBottom = spacing;
|
||||||
|
|
||||||
if (includepad) {
|
if (includepad) {
|
||||||
|
|||||||
@@ -633,7 +633,11 @@ public class StaticLayout extends Layout {
|
|||||||
bottom = fm.bottom;
|
bottom = fm.bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j == 0) {
|
boolean firstLine = (j == 0);
|
||||||
|
boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount);
|
||||||
|
boolean lastLine = currentLineIsTheLastVisibleOne || (end == bufEnd);
|
||||||
|
|
||||||
|
if (firstLine) {
|
||||||
if (trackPad) {
|
if (trackPad) {
|
||||||
mTopPadding = top - above;
|
mTopPadding = top - above;
|
||||||
}
|
}
|
||||||
@@ -642,7 +646,10 @@ public class StaticLayout extends Layout {
|
|||||||
above = top;
|
above = top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (end == bufEnd) {
|
|
||||||
|
int extra;
|
||||||
|
|
||||||
|
if (lastLine) {
|
||||||
if (trackPad) {
|
if (trackPad) {
|
||||||
mBottomPadding = bottom - below;
|
mBottomPadding = bottom - below;
|
||||||
}
|
}
|
||||||
@@ -652,9 +659,8 @@ public class StaticLayout extends Layout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int extra;
|
|
||||||
|
|
||||||
if (needMultiply && end != bufEnd) {
|
if (needMultiply && !lastLine) {
|
||||||
double ex = (below - above) * (spacingmult - 1) + spacingadd;
|
double ex = (below - above) * (spacingmult - 1) + spacingadd;
|
||||||
if (ex >= 0) {
|
if (ex >= 0) {
|
||||||
extra = (int)(ex + EXTRA_ROUNDING);
|
extra = (int)(ex + EXTRA_ROUNDING);
|
||||||
@@ -691,8 +697,6 @@ public class StaticLayout extends Layout {
|
|||||||
if (ellipsize != null) {
|
if (ellipsize != null) {
|
||||||
// If there is only one line, then do any type of ellipsis except when it is MARQUEE
|
// 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
|
// 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 forceEllipsis = moreChars && (mLineCount + 1 == mMaximumVisibleLineCount);
|
||||||
|
|
||||||
boolean doEllipsis =
|
boolean doEllipsis =
|
||||||
|
|||||||
Reference in New Issue
Block a user