解决方案 »

  1.   

    是自己定义XML文件?还是说用图片作为分割线?
      

  2.   

    如果在color.xml定义drawable的话是不行的,
    你需要xml中自己定义
    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="line">
        <stroke
            android:color="@color/amaya_color"/>
        <!-- 虚线的高度 -->
        <size android:height="1px"/>
    </shape>
    或这样:<?xml version="1.0" encoding="utf-8"?>
    <bitmap xmlns:android="http://schemas.android.com/apk/res/android"
            android:src="@drawable/amaya_bitmap"
            android:tileMode="repeat" />
      

  3.   

    简单点的,listview加
    android:divider="@color/gray_line"
    android:dividerHeight="1dp"
      

  4.   

    都是自定义的,其实你可以屏蔽掉listview的分割线,然后在item里面写个分割线