1 <?xml version="1.0" encoding="utf-8"?>
 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:layout_width="fill_parent"
 4     android:layout_height="wrap_content"
 5     android:orientation="horizontal" >
 6     
 7     <ImageView 
 8         android:src="@drawable/ic_launcher"
 9         android:layout_width="wrap_content"
10         android:layout_height="wrap_content"
11         android:contentDescription="@drawable/ic_launcher"/>
12     
13     <TextView 
14         android:id="@+id/list_item_textview"
15         android:layout_width="wrap_content"
16         android:layout_height="fill_parent"
17         android:paddingLeft="20dp"/>
18 
19 </LinearLayout>
View Code

如果图片是直接引用drawable中的图片资源,可以直接在TextView中定义,

可直接替换为:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:layout_width="fill_parent"
 4     android:layout_height="wrap_content"
 5     android:orientation="horizontal" >
 6     
 7     <TextView 
 8         android:id="@+id/list_item_textview"
 9         android:layout_width="wrap_content"
10         android:layout_height="fill_parent"
11         android:drawableLeft="@drawable/ic_launcher"
12         android:drawablePadding="20dp"/>
13 
14 </LinearLayout>
View Code