@@ -1696,8 +1696,14 @@ protected final boolean isSpanned() {
16961696 return text .getSpans (start , end , type );
16971697 }
16981698
1699+ private char getEllipsisChar (TextUtils .TruncateAt method ) {
1700+ return (method == TextUtils .TruncateAt .END_SMALL ) ?
1701+ ELLIPSIS_TWO_DOTS [0 ] :
1702+ ELLIPSIS_NORMAL [0 ];
1703+ }
1704+
16991705 private void ellipsize (int start , int end , int line ,
1700- char [] dest , int destoff ) {
1706+ char [] dest , int destoff , TextUtils . TruncateAt method ) {
17011707 int ellipsisCount = getEllipsisCount (line );
17021708
17031709 if (ellipsisCount == 0 ) {
@@ -1711,7 +1717,7 @@ private void ellipsize(int start, int end, int line,
17111717 char c ;
17121718
17131719 if (i == ellipsisStart ) {
1714- c = '\u2026' ; // ellipsis
1720+ c = getEllipsisChar ( method ) ; // ellipsis
17151721 } else {
17161722 c = '\uFEFF' ; // 0-width space
17171723 }
@@ -1785,7 +1791,7 @@ public void getChars(int start, int end, char[] dest, int destoff) {
17851791 TextUtils .getChars (mText , start , end , dest , destoff );
17861792
17871793 for (int i = line1 ; i <= line2 ; i ++) {
1788- mLayout .ellipsize (start , end , i , dest , destoff );
1794+ mLayout .ellipsize (start , end , i , dest , destoff , mMethod );
17891795 }
17901796 }
17911797
@@ -1890,4 +1896,6 @@ public enum Alignment {
18901896 /* package */ static final Directions DIRS_ALL_RIGHT_TO_LEFT =
18911897 new Directions (new int [] { 0 , RUN_LENGTH_MASK | RUN_RTL_FLAG });
18921898
1899+ /* package */ static final char [] ELLIPSIS_NORMAL = { '\u2026' }; // this is "..."
1900+ /* package */ static final char [] ELLIPSIS_TWO_DOTS = { '\u2025' }; // this is ".."
18931901}
0 commit comments