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

Commit 34a126e5 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Fix bug #3389545 android:ellipsize="end" doesn't work without using...

Fix bug #3389545 android:ellipsize="end" doesn't work without using android:singleLine="true" which is deprecated

- take care of single line case too

Change-Id: I73c3dcb96f22241b35d7cbaf43cd9bd46a4abcaa
parent f64dfccd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -716,7 +716,8 @@ public class StaticLayout extends Layout {
            boolean currentLineIsTheLastVisibleOne = (j + 1 == mMaximumVisibleLineCount);
            boolean forceEllipsis = moreChars && (mLineCount + 1 == mMaximumVisibleLineCount);

            boolean doEllipsis = (firstLine && !moreChars &&
            boolean doEllipsis =
                        (((mMaximumVisibleLineCount == 1 && moreChars) || (firstLine && !moreChars)) &&
                                ellipsize != TextUtils.TruncateAt.MARQUEE) ||
                        (!firstLine && (currentLineIsTheLastVisibleOne || !moreChars) &&
                                ellipsize == TextUtils.TruncateAt.END);