1. When the content displayed in textview is too long, you can actively display the ellipsis:
Ellipsis:
Android: ellipsize = "end" ellipsis at the end
Android: ellipsize = "start" ellipsis at the beginning
Android: ellipsize = "Middle" ellipsis in the middle
Number of lines displayed in textview:
Android: singleline = "true"
Android: lines = "2"
In the Java file:
TV. setellipsize (textutils. truncateat. valueof ("end "));
TV. setsingleline (true );
TV. setellipsize (null); // expand
TV. setellipsize (textutils. truncateat. End); // shrink
2. a horizontal line is added to the text center of textview:
TV _goods_price = (textview) v. findviewbyid (R. Id. TV _goods_price );
TV _goods_price.getpaint (). setflags (paint. strike_thru_text_flag );
Horizontal line at the bottom:
TV _goods_price.getpaint (). setflags (paint. underline_text_flag );
The textview is too long to display the ellipsis. a horizontal line is added to the text center of the textview.