On Tue, Jul 6, 2010 at 4:06 AM, Daniel Favela <[email protected]> wrote:
> Hello, Android beginners!
> I've completed all of the tutorials under the "Hello, Views" section.
>  However, I'm unsure if what I want to do is possible.
> I want the top of my UI to be a edit box and a button (much like in the
> "Relative" layout tutorial), and then everything following that should be a
> ListView.
> At first, I thought, "Hm.  It might not work, but maybe I can mix the XML."
>  Something like <RelativeLayout ...> ... </RelativeLayout> followed by a
> <ListView> ... </ListView>.  The problem I came across was that ListView is
> not created through XML;  instead, the code for it is within an activity.

It is not created through XML in that specific example. There are
other examples:

http://github.com/commonsguy/cw-android/tree/master/Selection/List/

> So... how can I get my UI to have these two layouts?

RelativeLayout holds everything else, including the ListView. You use
RelativeLayout rules (e.g., android:layout_alignParentTop,
android:layout_below) to position the widgets relative to each other
and the bounds of the RelativeLayout.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.8 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to