开发者

Determine which Checkboxes in a Listview are Checked

I have a listview with checkbox in each 开发者_JAVA百科row. I want to create a new listview when i click in a button with only the cheked items, but I don't know how to know which items are selected.

Sorry but i don't get to put my row.xml code...


There are few methods available to get the IDs or positions of the checked items:

getCheckedItemPosition () - returns an int with the currently checked item (only good for SINGLE_CHOICE_MODE)

 

getCheckedItemPositions () - returns an int [] with the currently checked items positions

 

getCheckedItemIds () - returns a long [] containing the IDs of the checked items

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜