Code example for TypedArray

Methods: getResourceId

0
    /** 
     * @return The resource ID for an account color. 
     * Otherwise, {@value #UNDEFINED_RESOURCE_ID} if color was not specified via ID. 
     */ 
    public int getAccountColorId(long accountId) {
        return mAccountColorArray.getResourceId(getAccountColorIndex(accountId),
                UNDEFINED_RESOURCE_ID);
    } 
 
    /** 
     * @return {@link Paint} equivalent to {@link #getAccountColor}. 
     */ 
    public Paint getAccountColorPaint(long accountId) {
        return mAccountColorPaints[getAccountColorIndex(accountId)];
    } 
}