Problem with TabHost UI layout.
Posted
by Alan B
on Stack Overflow
See other posts from Stack Overflow
or by Alan B
Published on 2010-06-13T09:34:11Z
Indexed on
2010/06/13
9:42 UTC
Read the original article
Hit count: 247
What I'm trying to do is create a layout like this:
+--------+
Search |EditText| [Button]
+--------+
+---------+
|Tab 1 |---------+
| |Tab 2 |
|---------+---------+-----------------+
| ListView Item 1 |
| ListView Item 2 |
| ListView Item 3 |
| ListView Item 4 |
| ListView Item 5 |
| ListView Item 6 |
| ListView Item 7 |
| ListView Item 8 |
| ListView Item 9 |
| ListView Item 10 |
+-------------------------------------+
So that's a TextView saying 'Search', an EditText and a button.
Then below it the tabs - Tab 1 has a ListView, Tab 2 some other stuff. I can get a simple TabHost setup with two tabs working fine but can't get the above to lay out properly. Any hints ?
I'd create the UI in the Eclipse designer and check the XML from that, except the designer doesn't work with TabHost. And DroidDraw doesn't seem to know about TabHost.
© Stack Overflow or respective owner