Android - Selected Item Position In A Listview
How can I retrieve the positions of the selected item in a multichoice listView? The getSelectedItemPosition method returns only the first one.
Solution 1:
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.
Post a Comment for "Android - Selected Item Position In A Listview"