开发者

How to limit list items display in ListView

I am getting XML data from url and displaying using a custom list adapter in a ListView.

I need to display only 10 items in ListView.

How i can do this?开发者_如何学Go

Please let me know

Thanks


Only put 10 items in the adapter. Or override getCount() and return 10.


The adapter you're using with the ListView only displays the item you put in it. Just put in your adapter 10 items, or whatever other number you want, and it will display only that items.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜