Code example for SparseArray

Methods: getput

    public abstract View getItemView(int section, int position, View convertView, ViewGroup parent);
    public abstract View getSectionHeaderView(int section, View convertView, ViewGroup parent);
    private int internalGetCountForSection(int section) {
        Integer cachedSectionCount = mSectionCountCache.get(section);
        if (cachedSectionCount != null) {
            return cachedSectionCount;
        int sectionCount = getCountForSection(section);
        mSectionCountCache.put(section, sectionCount);
        return sectionCount;
    private int internalGetSectionCount() { 
        if (mSectionCount >= 0) {
            return mSectionCount;
        mSectionCount = getSectionCount();
        return mSectionCount;
Connect your IDE to all the code out there  Get Codota for Java