Code example for SparseArray

Methods: clear

0
    } 
 
    @Override 
    public void notifyDataSetChanged() { 
        mSectionCache.clear();
        mSectionPositionCache.clear();
        mSectionCountCache.clear();
        mCount = -1;
        mSectionCount = -1;
        super.notifyDataSetChanged(); 
    } 
 
    @Override 
    public void notifyDataSetInvalidated() { 
        mSectionCache.clear();
        mSectionPositionCache.clear();
        mSectionCountCache.clear();
        mCount = -1;
        mSectionCount = -1;
        super.notifyDataSetInvalidated(); 
    }