1.TextView displays an ellipsis when the content is too long: the location of the ellipses:
Android:ellipsize= "End" ellipsis at the end
Android:ellipsize= "Start" ellipsis at the beginning
Android:ellipsize= "Middle" ellipsis in the middle
TextView the number of rows displayed:
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); Contraction
2.TextView text Middle Add Horizontal:
Tv_goods_price = (TextView) V.findviewbyid (R.id.tv_goods_price);
Tv_goods_price.getpaint (). SetFlags (Paint.strike_thru_text_flag);
Bottom underline:
Tv_goods_price.getpaint (). SetFlags (Paint.underline_text_flag);
TextView long display ellipsis, TextView text in the middle of the horizontal line