我怎样才能检索选定项目在multichoice ListView中的位置?在 getSelectedItemPosition
方法返回只有第一个。
How can I retrieve the positions of the selected item in a multichoice listView?
The getSelectedItemPosition
method returns only the first one.
有最多只有一个选择的项在的ListView
。
There is at most one selected item in a ListView
.
如果你的的ListView
是 CHOICE_MODE_SINGLE
或 CHOICE_MODE_MULTIPLE
,您可以使用 getCheckedItemPositions()
来获得的检查的人。
If your ListView
is CHOICE_MODE_SINGLE
or CHOICE_MODE_MULTIPLE
, you can use getCheckedItemPositions()
to get the checked ones.