Code example for SparseBooleanArray

Methods: keyAt, size

0
        return ids;
    } 
 
    @Override 
    public int getCheckedItemPosition() { 
        if (mChoiceMode == CHOICE_MODE_SINGLE && mCheckStates != null && mCheckStates.size() == 1) {
            return mCheckStates.keyAt(0);
        } 
        return INVALID_POSITION;
    } 
 
    @Override 
    public SparseBooleanArray getCheckedItemPositions() {
        if (mChoiceMode != CHOICE_MODE_NONE) {
            return mCheckStates;
        } 
        return null; 
    } 
 
    @Override 
    @Deprecated