0
我創建了一個列表視圖與25dp填充如何使列表項在列表視圖的填充後可見?
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
android:dividerHeight="25dp"
android:padding="20dp"
android:scrollbars="none"></ListView>
這是列表視圖的外觀
當我向下滾動列表,填充將超過列表項
我可以使列表視圖的邊框內的列表視圖可見範圍,不是在listview的內部填充?
列表項XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff">
<ImageView
android:id="@+id/button_history_list_item_one_function"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerVertical="true"
android:layout_margin="20dp"
android:src="@drawable/ic_launcher"/>
<LinearLayout android:layout_width="100dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_alignParentRight="true"
android:background="@drawable/left_border"
android:padding="10dp"
>
</LinearLayout>
</RelativeLayout>
此圖片顯示了我想要
刪除'android:padding =「20dp」' – 2014-11-05 06:27:12
你可以把listitem的XML? – 2014-11-05 06:29:37
如果我刪除了填充,那麼在列表的開始和結尾處都沒有空格,如果在listitem和listview之間沒有填充,它看起來不太好 – 2014-11-05 06:34:02