public boolean onClick(int position){
  if (mMode == MODE_MULTIPLE_SELECT) {
    if (mSelectedItems.contains(position)) {
      mSelectedItems.remove(position);
      if (mSelectedItems.isEmpty()) {
        setMode(MODE_SINGLE_SELECT);
      }
    }
 else {
      mSelectedItems.add(position);
    }
    notifySelectionChanged(position);
    return true;
  }
  return false;
}

public boolean onClick ( int position ) { if ( mMode == MODE_MULTIPLE_SELECT ) { if ( mSelectedItems . contains ( position ) ) { mSelectedItems . remove ( position ) ; if ( mSelectedItems . isEmpty ( ) ) { setMode ( MODE_SINGLE_SELECT ) ; } } else { mSelectedItems . add ( position ) ; } notifySelectionChanged ( position ) ; return true ; } return false ; }
to be invoked when an item in the list is clicked ( even when not in multi selection mode ) .
