You need to reverse the order of the child elements of RelativeLayout. In Android 1.6+, you can have a widget (e.g., your TextView) refer to a widget (e.g., your FrameLayout) that appears later in the XML. Android 1.5 does not support this. Hence, you need your FrameLayout to appear first in your XML, then the TextView. You do not need to change any of your attributes. Your layout should then work as expected.
On Wed, Jun 23, 2010 at 3:41 AM, KerlW <[email protected]> wrote: > My activity use the same RelativeLayout as it's content view whatever > the orientation is. > In this RelativeLayout, there is a FrameLayout align to it's bottom, > and a TextView above this FrameLayout, just like : > > <RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/ > android" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > > > <TextView android:id="@+id/tip_bar" > android:layout_above="@+id/control_panel" > android:layout_width="fill_parent" > android:layout_height="20dip" > android:layout_marginBottom="18dip" > android:gravity="center_vertical" > android:singleLine="true" > android:layout_alignWithParentIfMissing="true" > /> > > <FrameLayout android:id="@+id/control_panel" > android:layout_width="fill_parent" > android:layout_height="wrap_content" > android:layout_alignParentBottom="true" > > > </FrameLayout> > </RelativeLayout> > > on android 1.5 device > when orientation changed, the TextView lies in the wrong place, > middle when portrait, bottom when landscape. > on android 1.6 device > It is ok. > > How could I make it lies in the place where it should be on 1.5 > device? > Thanks and regards. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

