aboutsummaryrefslogtreecommitdiffstats
path: root/java/res
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-08-07 09:03:58 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-07 09:03:58 +0000
commit0bed75a81844f35cce359c2a7dfac71a8b3d84b9 (patch)
tree84aebf46739b60d2f26ba4a1664999f71e05ca4a /java/res
parentfdb0001851fa810b3f3523f0695ecb7cf83fc489 (diff)
parent0851d351332e6191857d81e245a6025c02c84219 (diff)
downloadlatinime-0bed75a81844f35cce359c2a7dfac71a8b3d84b9.tar.gz
latinime-0bed75a81844f35cce359c2a7dfac71a8b3d84b9.tar.xz
latinime-0bed75a81844f35cce359c2a7dfac71a8b3d84b9.zip
am 0851d351: am e988e412: Merge "Add Key label off center attribute" into lmp-dev
* commit '0851d351332e6191857d81e245a6025c02c84219': Add Key label off center attribute
Diffstat (limited to 'java/res')
-rw-r--r--java/res/values/attrs.xml10
-rw-r--r--java/res/values/themes-common.xml2
-rw-r--r--java/res/xml/key_styles_number.xml2
3 files changed, 12 insertions, 2 deletions
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 37ba3963b..91cd01723 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -293,7 +293,7 @@
<attr name="keyLabelFlags" format="integer">
<!-- This should be aligned with Key.LABEL_FLAGS__* -->
<flag name="alignIconToBottom" value="0x04" />
- <flag name="alignLeftOfCenter" value="0x08" />
+ <flag name="alignLabelOffCenter" value="0x08" />
<flag name="fontNormal" value="0x10" />
<flag name="fontMonoSpace" value="0x20" />
<flag name="fontDefault" value="0x30" />
@@ -368,6 +368,14 @@
<attr name="keyHintLabelRatio" format="fraction" />
<!-- Size of the text for shifted letter hint, in the proportion of key height. -->
<attr name="keyShiftedLetterHintRatio" format="fraction" />
+ <!-- The label's horizontal offset to the center of the key. Negative is to left and
+ positive is to right. The value is in proportion of the width of
+ TypefaceUtils.KEY_LABEL_REFERENCE_CHAR. -->
+ <attr name="keyLabelOffCenterRatio" format="fraction" />
+ <!-- The hint label's horizontal offset to the center of the key. Negative is to left and
+ positive is to right. The value is in proportion of the width of
+ TypefaceUtils.KEY_LABEL_REFERENCE_CHAR. -->
+ <attr name="keyHintLabelOffCenterRatio" format="fraction" />
<!-- Color to use for the label in a key. -->
<attr name="keyTextColor" format="color" />
<attr name="keyTextShadowColor" format="color" />
diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml
index cf7888ad6..fd1c9f8c4 100644
--- a/java/res/values/themes-common.xml
+++ b/java/res/values/themes-common.xml
@@ -41,6 +41,8 @@
<item name="keyHintLetterRatio">@fraction/config_key_hint_letter_ratio</item>
<item name="keyHintLabelRatio">@fraction/config_key_hint_label_ratio</item>
<item name="keyShiftedLetterHintRatio">@fraction/config_key_shifted_letter_hint_ratio</item>
+ <item name="keyLabelOffCenterRatio">-175%</item>
+ <item name="keyHintLabelOffCenterRatio">200%</item>
<item name="keyTypeface">normal</item>
<!-- A negative value to disable key text shadow layer. -->
<item name="keyTextShadowRadius">-1.0</item>
diff --git a/java/res/xml/key_styles_number.xml b/java/res/xml/key_styles_number.xml
index 3038097d8..14b202874 100644
--- a/java/res/xml/key_styles_number.xml
+++ b/java/res/xml/key_styles_number.xml
@@ -39,7 +39,7 @@
latin:parentStyle="numKeyBaseStyle" />
<key-style
latin:styleName="numberKeyStyle"
- latin:keyLabelFlags="alignLeftOfCenter|hasHintLabel"
+ latin:keyLabelFlags="alignLabelOffCenter|hasHintLabel"
latin:parentStyle="numKeyStyle" />
<key-style
latin:styleName="num0KeyStyle"