开发者

Getting the total number of checked items from a listview in Android

How to ge开发者_运维问答t the total number of checked items from a listview in Android? Please help.


There's getCheckedItemCount(). You could also call getCheckedItemIds() on it and then call length() on that. (You can get the ListView to call this on by doing a findViewById on it, or by calling getListView() inside the ListActivity.)


or you can try a loop to check what all items are selected.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜