item当中的布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_margin="10dp"
android:id="@+id/testimage"
android:layout_width="match_parent"
**android:layout_height="match_parent"**
android:src="@drawable/addphoto"
/>
</RelativeLayout>
发现当ImageView的高度设置为match_parent的时候死活显示不出来。自己设置一个高度或者是使用wrap_content就可以了