本文实例讲述了Android开发实现ListView和adapter配合显示图片和文字列表功能。分享给大家供大家参考,具体如下:
实际效果:
布局文件:
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical">
android:id="@+id/list1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="#f00"
android:dividerHeight="2px"
android:headerDividersEnabled="false">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="0dp"
android:background="#66ffffff"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:id="@+id/ifo_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入内容"
android:maxLines="6"
android:textColorHint="#c0c0c0" />
android:id="@+id/ifo_image"
android:layout_width="130dp"
android:layout_height="110dp"
android:src="@drawable/addphoto" />
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:id="@+id/delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
and