Sunday, 2 June 2013

Where can I set ellipsize property for ListView control?

Where can I set ellipsize property for ListView control?

In TextView control, I can set android:singleLine="true" and android:ellipsize="end" to truncate a long string, but I don't know how to set the property for ListView control, could you help me ? Thanks!
<ListView
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="0dip"
    android:background="#DDDDDD"
    android:layout_weight="1" />

<TextView
    android:id="@+id/textView5"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:ellipsize="end"
    android:singleLine="true"
    android:text="This is a web This is a web This is a web This is a web I will go to school" />

No comments:

Post a Comment