我正在自定義列表視圖xml文件。有兩個圖像和四個XML文件的TextViewAndroid中的自定義列表視圖對齊
這裏我的XML文件中的代碼
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imgproperty"
android:layout_width="70dip"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/StreetName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="14dp"
android:layout_toRightOf="@+id/imgproperty"
android:text="Street Name:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/lstlocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/StreetName"
android:layout_below="@+id/StreetName"
android:text="Location:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/lstsquare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/lstlocation"
android:layout_alignLeft="@+id/StreetName"
android:text="SquareFootage:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/lstprice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/lstsquare"
android:layout_alignLeft="@+id/StreetName"
android:text="Price:"
android:textAppearance="?android:attr/textAppearanceMedium" />
<ImageView
android:id="@+id/imglike"
android:layout_width="30dip"
android:layout_height="30dip"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="8dip"
android:src="@drawable/star1" />
</RelativeLayout>
這裏我的輸出
**我要首先設置圖像寬度的列表視圖的全屏排**
請建議我如何設置圖像寬度完整的列表視圖行
在此先感謝
顯示適配器代碼 – Autocrab