android自定义列表项xml根布局填充

android自定义列表项xml根布局填充,android,xml,list,layout,Android,Xml,List,Layout,我有一个自定义列表视图项布局。此布局的根项具有10dp填充,但当我在设备上加载列表时,项之间没有空格。在我的例子中,这意味着填充对根项不起作用。你知道为什么会这样吗` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rootLL" android:lay

我有一个自定义列表视图项布局。此布局的根项具有10dp填充,但当我在设备上加载列表时,项之间没有空格。在我的例子中,这意味着填充对根项不起作用。你知道为什么会这样吗`

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rootLL"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/white"
    android:padding="10dp"
    android:orientation="horizontal">

    <com.hipo.volt.ui.custom.RoundedImageView
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_margin="4dp"
        android:visibility="gone" />

    <com.hipo.volt.ui.custom.VoltTextView
        style="@style/textview_dark_style"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginLeft="10dp"
        android:padding="10dp" />

</LinearLayout>


谢谢

请发布您的xml:),如果您想在项目之间留出空间,那么您必须在ListView xml文件中使用listDivider您是对的@RohitGoswami它可以用于项目之间的空间,但我想了解填充不起作用的原因。我发布了我的xml:)