Code example for TypedArray

Methods: getInt

0
            return parentStyle.getInt(a, index, defaultValue);
        } 
 
        @Override 
        public int getFlag(TypedArray a, int index) {
            int value = a.getInt(index, 0);
            if (mStyleAttributes.containsKey(index)) {
                value |= (Integer)mStyleAttributes.get(index);
            } 
            final KeyStyle parentStyle = mStyles.get(mParentStyleName);
            return value | parentStyle.getFlag(a, index);
        } 
 
        void readKeyAttributes(TypedArray keyAttr) {
            // TODO: Currently not all Key attributes can be declared as style. 
            readString(keyAttr, R.styleable.Keyboard_Key_code);
            readString(keyAttr, R.styleable.Keyboard_Key_altCode);
            readString(keyAttr, R.styleable.Keyboard_Key_keyLabel);
            readString(keyAttr, R.styleable.Keyboard_Key_keyOutputText);
            readString(keyAttr, R.styleable.Keyboard_Key_keyHintLabel);
            readStringArray(keyAttr, R.styleable.Keyboard_Key_moreKeys);