Merge "Set StaticLayout.maxLines only when ellipsize is set" into nyc-dev am: 92d0316d28 am: 361f03c4e2

am: 3e7177f91f

* commit '3e7177f91f7e7097dcc4f6613c8baf7fff5a333e':
  Set StaticLayout.maxLines only when ellipsize is set

Change-Id: Ic21d60a789a0361ffca8362621fa03ded8d96ae5
This commit is contained in:
Siyamed Sinir
2016-05-27 23:40:05 +00:00
committed by android-build-merger

View File

@@ -6855,11 +6855,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
.setLineSpacing(mSpacingAdd, mSpacingMult)
.setIncludePad(mIncludePad)
.setBreakStrategy(mBreakStrategy)
.setHyphenationFrequency(mHyphenationFrequency)
.setMaxLines(mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
.setHyphenationFrequency(mHyphenationFrequency);
if (shouldEllipsize) {
builder.setEllipsize(mEllipsize)
.setEllipsizedWidth(ellipsisWidth);
.setEllipsizedWidth(ellipsisWidth)
.setMaxLines(mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
}
mHintLayout = builder.build();
}
@@ -6946,12 +6946,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
.setLineSpacing(mSpacingAdd, mSpacingMult)
.setIncludePad(mIncludePad)
.setBreakStrategy(mBreakStrategy)
.setHyphenationFrequency(mHyphenationFrequency)
.setMaxLines(mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
.setHyphenationFrequency(mHyphenationFrequency);
if (shouldEllipsize) {
builder.setEllipsize(effectiveEllipsize)
.setEllipsizedWidth(ellipsisWidth);
.setEllipsizedWidth(ellipsisWidth)
.setMaxLines(mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
}
// TODO: explore always setting maxLines
result = builder.build();