TextView must be declared relative to the parent. If you say that A (guide)
is under B (title) and B is above A all you have is a circular dependency.
You must use a fixed View for the TextBox, which is the parent. Use these
type of attributes for it instead of layout_above (align_ParentTop is the
best choice if you'd ask me):
android:layout_alignParentBottom If true, makes the bottom edge of this view
match the bottom edge of the parent.
android:layout_alignParentLeft If true, makes the left edge of this view
match the left edge of the parent.
android:layout_alignParentRight If true, makes the right edge of this view
match the right edge of the parent.
android:layout_alignParentTop If true, makes the top edge of this view match
the top edge of the parent.

Also, listen to what Mark says about ID's and take a look at the layout
examples in the APIDemos.

On Mon, Aug 10, 2009 at 9:54 PM, Mark Murphy <mmur...@commonsware.com>wrote:

>
> tinyang wrote:
> > Makes sense Andrei. Thanks for the reply.   So I made the change you
> > suggested and it still has not changed the layout.  Any other
> > suggestions?  Here is my current xml code after these suggested changes:
>
> This should not even build.
>
> > <TextView android:id=/"@+id/title"/
> >
> > android:layout_width=/"wrap_content"/
> >
> > android:layout_height=/"wrap_content"/
> >
> > android:layout_above=/"@id/guide"/
> >
> > android:layout_centerHorizontal=/"true"/
> >
> > android:text=/"BirdTracker Main Menu"/
>
> You cannot reference @id/guide here, because that widget has not been
> declared yet.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 In Print!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to