1.<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_vertical"
android:padding="5dip"
android:background="@color/darkblue"
android:drawableLeft="@drawable/yourPicture"
/>
2.<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/myIcon"
android:layout_width="25px"
android:layout_height="25px"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:focusable="false"
android:padding="4px"
/>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center_vertical"
android:padding="5dip"
android:background="@color/darkblue"
android:layout_toRightOf="@id/myIcon"
/>
</RelativeLayout>
标签:两种,item,并存,listView,方法,图文
From: https://blog.51cto.com/u_16166892/6525375