Java代码
- <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>
android:divider="#FFCC00"其中
android:dividerHeight="4px"
这两句为重点,少了第二句第一句话就会出错,可以根据自己需要设置分割线的宽窄