views:

247

answers:

1

How can i set the number of items to show in a list without to scroll?

Example: I have a list with 10 items. I want that only 3 items appears and that I have to scroll to see the rest of the items.

+2  A: 

I think the amount of Items shown in the Listview depends on the size that is available for the list. I would try a layout that limits the size of the list. It could be possible that such a detailed layout is not possible very easily, a different screen size could show more items etc.

Janusz
the problem is i have a RelativeLayout with a header, a listview and a footer. But the listview only fills a part of its space in the layout, and for that there is a black space between the listview and the footer. any idea?thanks
xger86x
Janusz is basically correct. There is no way in Android to say "only show 3 items", because the definition of "3 items" may vary, if the rows are of different heights.
CommonsWare
maybe you should post some pictures and explain your problem a little more
Janusz