【发布时间】:2011-05-06 10:49:33
【问题描述】:
我设法通过在 /app/res/drawable/ em> 文件夹:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:color="#534b4b"
android:width="1dp"
android:dashGap="2dp"
android:dashWidth="1dp"
/>
<size
android:height="1dp"
/>
</shape>
现在我对如何将此形状应用到 ListView 感到困惑。我尝试了以下方法,但没有显示分隔符:
<ListView android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="#00000000"
android:divider="@drawable/dash"
android:dividerHeight="1dp"
/>
什么?
【问题讨论】:
标签: android xml listview android-layout android-listview