Code example for TypedArray

Methods: getInt

            return parentStyle.getInt(a, index, defaultValue);
        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);
Connect your IDE to all the code out there  Get Codota for Java