Reputation:
How can I retrieve the positions of the selected item in a multichoice listView?
The getSelectedItemPosition
method returns only the first one.
Upvotes: 1
Views: 5714
Reputation: 1006819
There is at most one selected item in a ListView
.
If your ListView
is CHOICE_MODE_SINGLE
or CHOICE_MODE_MULTIPLE
, you can use getCheckedItemPositions()
to get the checked ones.
Upvotes: 10