Android ListView set Number of items to show

后端 未结 2 1377
一整个雨季
一整个雨季 2021-01-20 13:54

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 sc

2条回答
  •  渐次进展
    2021-01-20 14:25

    just do:

    list.remove(3);
    list.remove(4);
    ...
    list.remove(9);
    

    in the constructor of the listview adapter.

提交回复
热议问题