Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 361f03c4 authored by Siyamed Sinir's avatar Siyamed Sinir Committed by android-build-merger
Browse files

Merge "Set StaticLayout.maxLines only when ellipsize is set" into nyc-dev

am: 92d0316d

* commit '92d0316d':
  Set StaticLayout.maxLines only when ellipsize is set

Change-Id: I2b0281da1d8aba5f84da01c00f31d79af901db35
parents 86f5b560 92d0316d
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -6857,11 +6857,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();
            }
@@ -6948,12 +6948,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();