當利用textview顯示內容時,顯示內容過多可能會折行或顯示不全,那樣效果很不好。
實現如下:
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/hello"
android:ellipsize="end"
android:singleLine="true"
/>