我得到了SO幾個問題關於這一主題列表視圖項目,但所有這些之間的距離是列表視圖項和幾乎所有的答案之間有關距離建議使用透明分頻器作爲解決方案。有分頻器
但在我的情況下,我已經有兩個列表項目之間的分隔,所以我怎麼能申請一些邊距/填充/兩個列表項目之間的距離?
任何幫助表示讚賞。
XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/listMainPlans"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/list_divide"
android:dividerHeight="2dp" >
</ListView>
</LinearLayout>
請發佈xml佈局代碼。 – 2012-07-12 11:52:59
取決於您準確要達到的佈局。您可以創建/充氣自定義列表項並在XML中添加所需的填充/邊距。 – DroidBender 2012-07-12 11:53:39
這個XML看起來很好。關於**邊距/填充/距離**,如果您爲ListView準備了自定義適配器,則可以在行xml佈局中留下填充/邊距。 – 2012-07-12 11:56:17