【Android】 textview 中超出屏幕宽度的字符 省略号显示

当利用textview显示内容时,显示内容过多可能会折行或显示不全,那样效果很不好。

实现如下:

<TextView android:layout_width="fill_parent" 
                   android:layout_height="wrap_content"

                   android:id="@+id/hello" 
                   android:ellipsize="end"

                   android:singleLine="true" 
/>

原文地址:https://www.cnblogs.com/rayray/p/3554526.html