簡體   English   中英

刪除listview項之間的間距

[英]Remove spacing between listview items

我正在嘗試在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

我解決了

我縮小了圖片,這就是訣竅,所以問題甚至不在代碼中。 謝謝你的建議。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM