diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2014-08-07 14:12:01 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2014-08-07 14:39:57 +0900 |
| commit | ba49920e8046ca592d6c914b2e3f7394bf9c281c (patch) | |
| tree | 49303d11cb6e4543fe607f250176a1e294be3658 /java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java | |
| parent | e19c520b419faaf96180984528ae32b514a1bc77 (diff) | |
Add Key label off center attribute
This CL adds two Key attributes to control how much a label should be
off centered.
- keyLabelOffCenterRatio
- keyHintLabelOffCenterRatio
Bug: 14419121
Change-Id: I26650eefdd375f0eeca8a1ca6034a8339d2a3182
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java b/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java index 133462ac7..69cf2e389 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java @@ -48,6 +48,8 @@ public final class KeyVisualAttributes { public final int mPreviewTextColor; public final float mHintLabelVerticalAdjustment; + public final float mLabelOffCenterRatio; + public final float mHintLabelOffCenterRatio; private static final int[] VISUAL_ATTRIBUTE_IDS = { R.styleable.Keyboard_Key_keyTypeface, @@ -69,6 +71,8 @@ public final class KeyVisualAttributes { R.styleable.Keyboard_Key_keyShiftedLetterHintActivatedColor, R.styleable.Keyboard_Key_keyPreviewTextColor, R.styleable.Keyboard_Key_keyHintLabelVerticalAdjustment, + R.styleable.Keyboard_Key_keyLabelOffCenterRatio, + R.styleable.Keyboard_Key_keyHintLabelOffCenterRatio }; private static final SparseIntArray sVisualAttributeIds = new SparseIntArray(); private static final int ATTR_DEFINED = 1; @@ -135,5 +139,9 @@ public final class KeyVisualAttributes { mHintLabelVerticalAdjustment = ResourceUtils.getFraction(keyAttr, R.styleable.Keyboard_Key_keyHintLabelVerticalAdjustment, 0.0f); + mLabelOffCenterRatio = ResourceUtils.getFraction(keyAttr, + R.styleable.Keyboard_Key_keyLabelOffCenterRatio, 0.0f); + mHintLabelOffCenterRatio = ResourceUtils.getFraction(keyAttr, + R.styleable.Keyboard_Key_keyHintLabelOffCenterRatio, 0.0f); } } |
