Code example for SparseIntArray

Methods: indexOfKey

0
    private int getIndex(int elementID) {
        if (!this.bParsed) {
            throw new IllegalStateException("Trying to obtain element from no parsed set. Parse style set before using it.");
        } 
 
        int index = aElementAttrs.indexOfKey(elementID);
 
        if (index < 0) {
            if (USER_LOG)
                Log.e(TAG, "No attribute mapped for the given elementID(" + elementID + ")");
            index = NO_ELEMENT_ATTR;
        } else { 
            // index = mTypedArray.getIndex(index); 
        } 
 
        return index;
    } 
 
    /** 
     * Abstract methods ---------------------- 
     */