Code example for SparseBooleanArray

Methods: keyAt, size

0
            return super.getCheckedItemPosition(); 
        } 
 
        // Code copied from Android source 
        if (mChoiceModeC == ListView.CHOICE_MODE_SINGLE && mCheckStatesC != null
                && mCheckStatesC.size() == 1) {
            return mCheckStatesC.keyAt(0);
        } 
 
        return INVALID_POSITION;
    } 
 
    /** 
     * WARN Do not call the default api 
     *  
     * @return 
     */ 
    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public SparseBooleanArray getCheckedItemPositions() {
        if (!inCompatibleMode) {
            return super.getCheckedItemPositions();