相关疑难解决方法(0)

不显示ListView内的RelativeLayout边距

我目前正在使用ListView,我使用RelativeLayout来填充自定义适配器.问题是RelativeLayout没有显示边距.

这是我的相对布局声明:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/ArticleSnippet" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:padding="6dip" 
    android:layout_marginTop="10dip" 
    android:layout_marginLeft="10dip" 
    android:layout_marginRight="10dip" 
    android:background="@drawable/background_snippet" > 
    ... 
</RelativeLayout> 
Run Code Online (Sandbox Code Playgroud)

ListView声明:

<ListView 
    android:id="@+id/ArticleSnippets" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:divider="#fff" 
    android:dividerHeight="0sp"> 
</ListView> 
Run Code Online (Sandbox Code Playgroud)

有什么特别的事要做,以使ListView中的边距有效吗?

在此先感谢您的帮助,

林特(Dusariez JF)

android

3
推荐指数
1
解决办法
4590
查看次数

标签 统计

android ×1