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.
精彩评论