Code example for SparseBooleanArray

Methods: put

0
        mNameList = nameList;
        mPathList = pathList;
        mTitleList = titleList;
        mDurationList = durationList;
        mIdList = idList;
        mCheckStates = new SparseBooleanArray();
        mCheckedItemId = new ArrayList<Integer>();
        mIdPos = new SparseIntArray();
        mCurPos = curPos;
        if(mCurPos != -1){
            mCheckStates.put(mCurPos, true);
        } 
    } 
 
    /** 
     * The constructor to construct a navigation view adapter 
     *  
     * @param context 
     *            the context of FileManagerActivity 
     * @param nameList 
     *            a list of file names