Tôi đang cố gắng đặt lề thành bộ chia listview
.
Dải phân cách một dòng tiêu tan:Biên độ phân chia danh sách
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line" >
<stroke
android:dashGap="1dp"
android:dashWidth="1.5dp"
android:width="1dp"
android:color="#FF404040" />
<size android:height="3dp" />
</shape>
và listview
nơi tôi đặt chia
<ListView
android:id="@+id/lv_news_feed_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:divider="@drawable/ch_dashed_line_divider"
/>
nhưng tôi muốn có một chia lề trái và phải. Tôi cũng đã cố gắng đặt hình đệm thành hình, nhưng listview
bỏ qua phần đệm.
<padding
android:bottom="15dp"
android:left="15dp"
android:right="15dp"
android:top="15dp" />
Có khả năng thiết lập một quỹ để đảm bảo chia listview
- ngoại trừ trong getView() của Adaptor?
Giải pháp tốt nhất: http://stackoverflow.com/questions/14054364/how-to-assign-padding-to-listview-item-divider-line?lq=1 – ASP