tags:

views:

30

answers:

1

For my next application, I'd like a ListView to form part of the app. Specifically, I'd like it to be the top half of the screen. Having looked through the documentation, I've only been able to find full screen list views, ie with the list taking up the full screen.

Is there any way of doing ListViews differently? I know there must be, but I'm unsure how to implement them myself. Does anyone have any pointers?

+2  A: 

Just put the ListView in a container, like a LinearLayout or RelativeLayout, along with peer widgets. Like you see here.

CommonsWare
Many thanks for the help, it was invaluable. Is there any way I could have more than one listview? I'm not sure how it would be initialized using the method you showed me. I could of course use buttons if required, but a listview would be nicer.
Bakes
"Is there any way I could have more than one listview?" Sure. If you are using a `ListActivity`, it will only manage one of them, but you can deal with the other in your own code.
CommonsWare