Code example for TypedArray

Methods: getInt, hasValue

0
            return parentStyle.getString(a, index);
        } 
 
        @Override 
        public int getInt(final TypedArray a, final int index, final int defaultValue) {
            if (a.hasValue(index)) {
                return a.getInt(index, defaultValue);
            } 
            final Object value = mStyleAttributes.get(index);
            if (value != null) {
                return (Integer)value;
            } 
            final KeyStyle parentStyle = mStyles.get(mParentStyleName);
            return parentStyle.getInt(a, index, defaultValue);
        } 
 
        @Override 
        public int getFlag(final TypedArray a, final int index) {
            int flags = a.getInt(index, 0);
            final Object value = mStyleAttributes.get(index);
            if (value != null) {