- <LinearLayout
- xmlns:android="Http://schemas.android.com/apk/res/android"
- Android:layout_width="Wrap_content"
- android:layout_height="Wrap_content">
- <ListView
- android:id="@+id/android:list"
- Android:layout_width="Wrap_content"
- android:layout_height="Wrap_content"
- android:divider="#FFCC00"
- android:dividerheight="4px"/>
- </linearlayout>
System controls in the Android platform provide flexible customization options, and all widget controls that are based on the ListView or Abslistview implementation can set line spacing split lines by using the following method, which allows you to customize the color, or picture .
In the listview we use the attribute android:divider= "#FF0000" to define the delimiter to be red, of course, here the value can point to a drawable picture object, if the use of the picture may be higher than the system default pixels, you can set the height such as 6 pixels Android:dividerheight= "6px", the Android Development network hint of course in Java in the ListView also has related methods can be set.
Other great article articles
Android Learning Note (38) using ProgressDialog to create a skin feed dialog box
Large Web site architecture design-SOLR
Android Learning Note (39) Message tip Use TOAST to hint information lightly
Android Learning Note (32) grid view (GridView) and graphics switcher (Imageswi ...
Android Learning Note (31) Expandable List Component (Expandablelistview)
more about Android development articles
Android--listview Split Line