I'm working on a layout where I use a ListView with RelativeLayout line items. The lineitems themselves are not displaying correctly.
The issue is that the txtVideoDuration TextView is drawn at the top of the line item instead of the bottom. Because of this the txtVideoTitle gets a height of 0. As you can see in the XML the txtVideoDuration is supposed to be clamped to the bottom of the ListView. My goal is to have the layout resemble the tutorial that google gave me. Example: [http://android-developers.blogspot.com/2009/02/android- layout-tricks-1.html][1] I'm using Android 2.0.1. I've even plugged in the example layout with out modification into the ListView and the same behavior happens. <?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="?android:attr/listPreferredItemHeight" android:padding="6dip"> <ImageView android:layout_width="wrap_content" android:layout_height="fill_parent" android:id="@+id/imgVideoThumbnail" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:minHeight="64dip" android:layout_marginRight="6dip" android:src="@drawable/icon" /> <TextView android:id="@+id/txtVideoDuration" android:layout_width="fill_parent" android:layout_height="26dip" android:layout_toRightOf="@+id/imgVideoThumbnail" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:singleLine="true" android:ellipsize="marquee" android:text="0:00:00" /> <TextView android:id="@+id/txtVideoTitle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgVideoThumbnail" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_above="@+id/txtVideoDuration" android:layout_alignWithParentIfMissing="true" android:gravity="center_vertical" android:text="[Title]" android:textColor="#FFFFFF" /> </RelativeLayout> [1]: http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en