Code example for SparseBooleanArray

Methods: keyAtsize

0
    public int getCheckedItemPosition() { 
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            return super.getCheckedItemPosition(); 
        } 
         
        if (mChoiceMode == CHOICE_MODE_SINGLE && mCheckStates != null && mCheckStates.size() == 1) {
            return mCheckStates.keyAt(0);
        } 
         
        return INVALID_POSITION;
    } 
     
    @SuppressLint("NewApi") 
    @Override 
    public SparseBooleanArray getCheckedItemPositions() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            return super.getCheckedItemPositions(); 
        } 
         
        if (mChoiceMode != CHOICE_MODE_NONE) {
Contextual code suggestions in your IDE  Get Codota for Java