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 anint
with the currently checked item (only good forSINGLE_CHOICE_MODE
)
getCheckedItemPositions ()
- returns anint []
with the currently checked items positions
getCheckedItemIds ()
- returns along []
containing the IDs of the checked items
精彩评论