Minimum number of rows:
Android:minlines = "2"//minimum number of rows is 2
Maximum number of rows:
Android:maxlines = "2"//maximum number of rows is 2
The word "..." means:
Android:ellipsize = "End"//ellipsis at the end
Ellipsize usage:
1. In XML
Android:ellipsize = "End" ellipsis at the end
Android:ellipsize = "Start" ellipsis at the beginning
Android:ellipsize = "Middle" ellipsis in the middle
Android:ellipsize = "Marquee" marquee
It's best to add a constraint Android:singleline = "true"
2, of course, you can also use code statements
Tv.setellipsize (TextUtils.TruncateAt.valueOf ("END"));
Tv.setellipsize (TextUtils.TruncateAt.valueOf ("START"));
Tv.setellipsize (TextUtils.TruncateAt.valueOf ("Middle"));
Tv.setellipsize (TextUtils.TruncateAt.valueOf ("MARQUEE"));
It is best to add a constraint tv.setsingleline (true);
This attribute is not only available for TextView, but also for Editext, but it does not support marquee
TextView limit the maximum number of rows, the minimum number of rows, the word count over the "..." means