This is a follow up question to this question:
Retrieving the selected items from a multi-select ListView
I'm using a ListView
with mode CHOICE_MODE_MULTIPLE_MODAL
.
Is there a way to get the indexes of all checked Items ? In the question I posted above, there's a suggestion to use the method getCheckedItemPositions()
, but I don't want to iterate over the entire list and check if it returns true so this is not what I need. I want to do something like this (pseudo code):
int[] checkedPositions = list.getCheckedIndexes();
for(int index : checkedPositions)
{
list.remove(index);
}
Is there a way to do something like that?