aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2014-08-07 11:37:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-05 00:03:09 +0000
commit5f57fe4ad035f3deb53a58616efea843546266b4 (patch)
tree44a7e75005099931d2ae286b9ab79968ddd24003 /java/src
parent5218382141a0ea5dfd5a4323dd15da87f7f948d7 (diff)
parent44e20f4fb42380061b1c4aa8905c2b301d7130cd (diff)
downloadlatinime-5f57fe4ad035f3deb53a58616efea843546266b4.tar.gz
latinime-5f57fe4ad035f3deb53a58616efea843546266b4.tar.xz
latinime-5f57fe4ad035f3deb53a58616efea843546266b4.zip
Merge "Revert "Remove unused Key and Keyboard attributes"" into lmp-dev
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/Key.java3
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyDrawParams.java3
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java4
3 files changed, 10 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java
index f8c005845..18b81161c 100644
--- a/java/src/com/android/inputmethod/keyboard/Key.java
+++ b/java/src/com/android/inputmethod/keyboard/Key.java
@@ -70,6 +70,7 @@ public class Key implements Comparable<Key> {
private static final int LABEL_FLAGS_FOLLOW_KEY_LARGE_LETTER_RATIO = 0x40;
private static final int LABEL_FLAGS_FOLLOW_KEY_LETTER_RATIO = 0x80;
private static final int LABEL_FLAGS_FOLLOW_KEY_LABEL_RATIO = 0xC0;
+ private static final int LABEL_FLAGS_FOLLOW_KEY_LARGE_LABEL_RATIO = 0x100;
private static final int LABEL_FLAGS_FOLLOW_KEY_HINT_LABEL_RATIO = 0x140;
// End of key text ratio mask enum values
private static final int LABEL_FLAGS_HAS_POPUP_HINT = 0x200;
@@ -579,6 +580,8 @@ public class Key implements Comparable<Key> {
return params.mLargeLetterSize;
case LABEL_FLAGS_FOLLOW_KEY_LABEL_RATIO:
return params.mLabelSize;
+ case LABEL_FLAGS_FOLLOW_KEY_LARGE_LABEL_RATIO:
+ return params.mLargeLabelSize;
case LABEL_FLAGS_FOLLOW_KEY_HINT_LABEL_RATIO:
return params.mHintLabelSize;
default: // No follow key ratio flag specified.
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyDrawParams.java b/java/src/com/android/inputmethod/keyboard/internal/KeyDrawParams.java
index df50efdc1..6dbee55ae 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyDrawParams.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyDrawParams.java
@@ -26,6 +26,7 @@ public final class KeyDrawParams {
public int mLetterSize;
public int mLabelSize;
public int mLargeLetterSize;
+ public int mLargeLabelSize;
public int mHintLetterSize;
public int mShiftedLetterHintSize;
public int mHintLabelSize;
@@ -55,6 +56,7 @@ public final class KeyDrawParams {
mLetterSize = copyFrom.mLetterSize;
mLabelSize = copyFrom.mLabelSize;
mLargeLetterSize = copyFrom.mLargeLetterSize;
+ mLargeLabelSize = copyFrom.mLargeLabelSize;
mHintLetterSize = copyFrom.mHintLetterSize;
mShiftedLetterHintSize = copyFrom.mShiftedLetterHintSize;
mHintLabelSize = copyFrom.mHintLabelSize;
@@ -90,6 +92,7 @@ public final class KeyDrawParams {
attr.mLetterSize, attr.mLetterRatio, mLetterSize);
mLabelSize = selectTextSizeFromDimensionOrRatio(keyHeight,
attr.mLabelSize, attr.mLabelRatio, mLabelSize);
+ mLargeLabelSize = selectTextSize(keyHeight, attr.mLargeLabelRatio, mLargeLabelSize);
mLargeLetterSize = selectTextSize(keyHeight, attr.mLargeLetterRatio, mLargeLetterSize);
mHintLetterSize = selectTextSize(keyHeight, attr.mHintLetterRatio, mHintLetterSize);
mShiftedLetterHintSize = selectTextSize(keyHeight,
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java b/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java
index c60d587db..69cf2e389 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyVisualAttributes.java
@@ -31,6 +31,7 @@ public final class KeyVisualAttributes {
public final float mLabelRatio;
public final int mLabelSize;
public final float mLargeLetterRatio;
+ public final float mLargeLabelRatio;
public final float mHintLetterRatio;
public final float mShiftedLetterHintRatio;
public final float mHintLabelRatio;
@@ -55,6 +56,7 @@ public final class KeyVisualAttributes {
R.styleable.Keyboard_Key_keyLetterSize,
R.styleable.Keyboard_Key_keyLabelSize,
R.styleable.Keyboard_Key_keyLargeLetterRatio,
+ R.styleable.Keyboard_Key_keyLargeLabelRatio,
R.styleable.Keyboard_Key_keyHintLetterRatio,
R.styleable.Keyboard_Key_keyShiftedLetterHintRatio,
R.styleable.Keyboard_Key_keyHintLabelRatio,
@@ -111,6 +113,8 @@ public final class KeyVisualAttributes {
R.styleable.Keyboard_Key_keyLabelSize);
mLargeLetterRatio = ResourceUtils.getFraction(keyAttr,
R.styleable.Keyboard_Key_keyLargeLetterRatio);
+ mLargeLabelRatio = ResourceUtils.getFraction(keyAttr,
+ R.styleable.Keyboard_Key_keyLargeLabelRatio);
mHintLetterRatio = ResourceUtils.getFraction(keyAttr,
R.styleable.Keyboard_Key_keyHintLetterRatio);
mShiftedLetterHintRatio = ResourceUtils.getFraction(keyAttr,