2011年11月3日 星期四

Android: ListView divider

A ListView divider is displayed between each ListView item.

The divider attribute can be either a color or a drawable graphic resource.

If a color is specified, then a horizontal line (whose thickness is configurable) will be displayed between items in the list.

If a drawable graphic resource is used, the graphic will appear between items.

    <ListView
        android:id="@+id/listView1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"      
        android:divider="#F00"
        android:dividerHeight="1px">
    </ListView>

沒有留言:

張貼留言