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