我正在尝试在 Android 中制作一个包含图像的 ListView。
我希望图像在列表中彼此相对,但我似乎无法消除间距。
这是我的 listview.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
android:divider="@android:color/transparent"
android:dividerHeight="0.0px"
android:padding="0dip"
android:layout_margin="0dip"
/>
</LinearLayout>
这是我的 listrow.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/vw01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView android:id="@+id/img01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="0dip"
android:layout_margin="0dip"/>
</LinearLayout>
你可以看到我在这里谈论的间距:http://imgbucket.info/img/kad67sjsg/stackoverflow.png http://imgbucket.info/img/kad67sjsg/stackoverflow.png
我解决了。
我缩小了图片的大小,这成功了,所以问题甚至不在代码中。
感谢您的建议。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)