Code example for LongSparseArray

0
            return; 
        } 
         
        if (adapter != null) {
            if (mChoiceMode != CHOICE_MODE_NONE && adapter.hasStableIds() && mCheckedIdStates == null) {
                mCheckedIdStates = new LongSparseArray<Boolean>();
            } 
        } 
        if (mCheckStates != null) {
            mCheckStates.clear();
        } 
        if (mCheckedIdStates != null) {
            mCheckedIdStates.clear();
        } 
    } 
     
    @SuppressLint("NewApi") 
    @Override 
    public void setChoiceMode(int choiceMode) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
Connect your IDE to all the code out there  Get Codota for Java