In Android, the maximum length of TextView is set, and the ellipsis is displayed. androidtextview
Today, I encountered a problem in the project. The title bar on the top of a page shows the company name. However, the company name is too long to be displayed, which affects the appearance. For this reason, I would like to make a small summary here.
TextView has an ellipsize attribute, which is used to display the control when the text is too long:
1. Android: ellipsize = "start" -- The ellipsis is displayed at the beginning.
2. android: ellipsize = "end" -- The ellipsis is displayed at the end.
3. android: ellipsize = "middle" -- The ellipsis is displayed in the middle.
4. android: ellipsize = "marquee"-displayed as a running horse light (horizontal movement of the animation)
Set ellipsize = "end" to display the effect.
After the change, it looks much better !!