我目前正在使用一个 ListView,我用带有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>
ListView声明:
<ListView
android:id="@+id/ArticleSnippets"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#fff"
android:dividerHeight="0sp">
</ListView>
是否需要做一些特殊的事情才能使 ListView 内的边距处于活动状态?
预先感谢您的任何帮助,
林特 (Dusariez JF)
如果您的边距仅适用于外边缘,请尝试在RelativeLayout 上进行填充。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)