How to get Selected items from Multi Select List View

SparseBooleanArray.get returns a boolean, but I believe you need to check it for each position in your list, e.g.

int len = listView.getCount();
SparseBooleanArray checked = listView.getCheckedItemPositions();
for (int i = 0; i < len; i++)
 if (checked.get(i)) {
  String item = cont_list.get(i);
  /* do whatever you want with the checked item */
 }

This API is a mess. Here is what works for me.

SparseBooleanArray checked = tags.getCheckedItemPositions();
for (int i = 0; i < checked.size(); i++) {
    if(checked.valueAt(i)) {
        Tag tag = (Tag) tags.getItemAtPosition(checked.keyAt(i));
        Log.i("xxxx", i + " " + tag);
    }
}