开发者

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

开发者 https://www.devze.com 2023-03-08 17:11 出处:网络
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()

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

精彩评论

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