一个ListView里面RelativeLayout的利润率不显示 [英] RelativeLayout margins inside a ListView are not displayed

查看:116
本文介绍了一个ListView里面RelativeLayout的利润率不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用我填与RelativeLayout的的自定义适配器的ListView。问题是,边缘不显示为RelativeLayout的。

I'm currently using a ListView that I fill with a custom adapter with RelativeLayout's. The problem is that the margins are not displayed for the RelativeLayout.

下面是我的亲戚布局声明:

Here is my relative layout declaration :

<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>

ListView控件声明:

The ListView declaration :

<ListView 
    android:id="@+id/ArticleSnippets" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:divider="#fff" 
    android:dividerHeight="0sp"> 
</ListView>

有什么特别做的,使一个ListView里面的保证金活跃?

Is there anything special to do to make the margin active inside a ListView ?

在此先感谢您的帮助,

皮棉(Dusariez JF)

Lint (Dusariez JF)

推荐答案

如果你的利润只适用于外边缘,尽量填充的RelativeLayout的吧。

If your margins just apply to the outer edges, try padding on the RelativeLayout instead.

这篇关于一个ListView里面RelativeLayout的利润率不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆