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