Hello, Android beginners!

I've completed all of the tutorials under the "Hello,
Views<http://developer.android.com/resources/tutorials/views/index.html>"
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<http://developer.android.com/resources/tutorials/views/hello-relativelayout.html>"
layout tutorial), and then everything following that should be a
ListView<http://developer.android.com/resources/tutorials/views/hello-listview.html>
.

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.
 The code directly from the tutorial follows:

---

public class ListViewActivity extends ListActivity {
    /** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(this,           // <-- This is
giving me a ListView!
android.R.layout.simple_list_item_1, COUNTRIES));
getListView().setTextFilterEnabled(true);
}
...

}

---

So... how can I get my UI to have these two layouts?  Is such a combination
even possible, or do I have to adhere to a single layout at a time on the
screen?

Thank you in advance!

-Danny

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