Sometimes when the Textview is displayed in a ListView, the text will be displayed interlaced due to the length being too long, which looks more unfriendly on the UI.
The official provides relevant methods to implement single-line display.
Just need the following settings:
(); (("END"));
Set it in xml as follows:
android:singleLine="true" android:ellipsize="end"
If the singleline in the middle is set to true, a single line can be realized, and the ellipsize is at the end, while ellipsize controls the position of the ellipses, including start (start), middle (middle), end (last), and marquee (marquee).
The above is the Android setting introduced by the editor to you when the text in the TextView exceeds the capacity of the TextView, and use an ellipsis instead. I hope it will be helpful to everyone. If you have any questions, please leave me a message. The editor will reply to everyone in time!