KeyboardView 设置自定义键盘上文本的属性,其中字体的设置用:android:keyTextSize    android:labelTextSize 即可实现!! 亲测!

解决方案 »

  1.   

    看了下,没找到...
        public static class Key {
            /** 
             * All the key codes (unicode or custom code) that this key could generate, zero'th 
             * being the most important.
             */
            public int[] codes;
            
            /** Label to display */
            public CharSequence label;
            
            /** Icon to display instead of a label. Icon takes precedence over a label */
            public Drawable icon;
            /** Preview version of the icon, for the preview popup */
            public Drawable iconPreview;
            /** Width of the key, not including the gap */
            public int width;
            /** Height of the key, not including the gap */
            public int height;
            /** The horizontal gap before this key */
            public int gap;
            /** Whether this key is sticky, i.e., a toggle key */
            public boolean sticky;
            /** X coordinate of the key in the keyboard layout */
            public int x;
            /** Y coordinate of the key in the keyboard layout */
            public int y;
            /** The current pressed state of this key */
            public boolean pressed;
            /** If this is a sticky key, is it on? */
            public boolean on;
            /** Text to output when pressed. This can be multiple characters, like ".com" */
            public CharSequence text;
            /** Popup characters */
            public CharSequence popupCharacters;        /** 
             * Flags that specify the anchoring to edges of the keyboard for detecting touch events
             * that are just out of the boundary of the key. This is a bit mask of 
             * {@link Keyboard#EDGE_LEFT}, {@link Keyboard#EDGE_RIGHT}, {@link Keyboard#EDGE_TOP} and
             * {@link Keyboard#EDGE_BOTTOM}.
             */
            public int edgeFlags;
            /** Whether this is a modifier key, such as Shift or Alt */
            public boolean modifier;
            /** The keyboard that this key belongs to */
            private Keyboard keyboard;
            /** 
             * If this key pops up a mini keyboard, this is the resource id for the XML layout for that
             * keyboard.
             */
            public int popupResId;
            /** Whether this key repeats itself when held down */
            public boolean repeatable;