0
我很新的相對佈局和我與他們掙扎;)的Android RelativeLayout的煩惱
我所試圖做的是: http://pineapple.cc/plan.jpg
但我得到的是: http://pineapple.cc/result.jpg
這是我的代碼:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/list_poi_image"
android:src="@drawable/ic_launcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/list_poi_ll"
android:background="#000000" />
<LinearLayout
android:id="@+id/list_poi_ll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:id="@+id/list_poi_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/list_poi_date_created"
android:text="Name"/>
<TextView android:id="@+id/list_poi_date_created"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="Date created"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView android:id="@+id/list_poi_description"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/list_poi_date_planned"
android:text="Description"/>
<TextView android:id="@+id/list_poi_date_planned"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="Date planned"/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
我在做什麼錯???
感謝您的幫助!
謝謝了很多,我不知道相對的佈局是如此「強大」,現在我明白如何使用它們更多 非常感謝您的幫助! (這些字符串用於調試) – user1029309 2012-02-12 17:43:01