我正在使用多项选择列表视图,在此我会在单击它时获取位置值。如何知道它是否被选中。请帮助我。谢谢。
2 回答
3
放:
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
并检查是否检查了 listView 中的特定视图:
listView.isItemChecked(i) //i is the position of the view.
于 2012-02-28T09:52:58.937 回答
0
使用 Array boolean[] selected
,您可以在其中保存复选框状态。
在你的 OnItemSelected 方法中使用这个:
选定[位置] = true 或 false
于 2012-02-28T09:49:17.547 回答