Thus, all of the answers above satisfy the requirement that only 1 line is displayed and then an ellipsis. However, if you want the ellipsis to appear after certain lines of text, you should use the following:
android:ellipsize="end" android:maxLines="2" android:singleLine="false"
In this case, the ellipsis appears only after 2 lines. Note. It is important that singleLine is false.
SDK4551 Jan 24 '19 at 4:34 am 2019-01-24 04:34
source share