Use android:layout_above="@+id/flyobject instead. The + denotes forward lookup.
Thanks and Regards, Kumar Bibek http://tech-droid.blogspot.com On Jul 16, 7:38 pm, zci_zr <rui.zhan...@googlemail.com> wrote: > Hi > > i am new to android, I try to create layout so that I have background > image, and have a ImageView with animation start from bottom right of > screen and along with a TextView stay on top of this ImageView. (Hope > my describe make sense). > > My problem is when I try use "android:layout_above="@id/flyobject"", > the eclipse alway say: error: Error: No resource found that matches > the given name (at 'layout_above' with value '@id/flyobject'). But as > for sure I have defined flyobject, and I can find it's in my R class. > > I really need help ~~ > > Thanks > > here is my XML file: > > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > > <ImageView > android:id="@+id/background" > android:src = "@drawable/background" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:scaleType="centerCrop" > /> > <TextView > android:id="@+id/flytext" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:layout_above="@id/flyobject" > /> > <ImageView > android:id="@+id/flyobject" > android:src="@drawable/asteroid01" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:layout_alignParentRight="true" > android:layout_alignParentBottom="true" > > /> > </RelativeLayout> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en