aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-04-10 20:54:47 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-10 20:54:47 -0700
commit1dc7fd3f8085c5a729061a7b35f71a2024a5ce0b (patch)
tree160968cf74797a2bd718afd2a81ceffcb2c43b6d /java/src/com/android/inputmethod
parentb7917ee347898d5dc9b1698ec7818b3a4cc8a035 (diff)
parentcee512b63ed74ed6d9dab25bd1c19376fe98e1ce (diff)
downloadlatinime-1dc7fd3f8085c5a729061a7b35f71a2024a5ce0b.tar.gz
latinime-1dc7fd3f8085c5a729061a7b35f71a2024a5ce0b.tar.xz
latinime-1dc7fd3f8085c5a729061a7b35f71a2024a5ce0b.zip
am cee512b6: Merge "More precise geometry checking for more keys keyboard"
* commit 'cee512b63ed74ed6d9dab25bd1c19376fe98e1ce': More precise geometry checking for more keys keyboard
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
index 66c30149c..f81ab8dd6 100644
--- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
+++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboard.java
@@ -73,10 +73,11 @@ public final class MoreKeysKeyboard extends Keyboard {
final int rowHeight, final int coordXInParent, final int parentKeyboardWidth,
final boolean isFixedColumnOrder, final int dividerWidth) {
mIsFixedOrder = isFixedColumnOrder;
- if (parentKeyboardWidth / keyWidth < maxColumns) {
+ if (parentKeyboardWidth / keyWidth < Math.min(numKeys, maxColumns)) {
throw new IllegalArgumentException(
"Keyboard is too small to hold more keys keyboard: "
- + parentKeyboardWidth + " " + keyWidth + " " + maxColumns);
+ + parentKeyboardWidth + " " + keyWidth + " "
+ + numKeys + " " + maxColumns);
}
mDefaultKeyWidth = keyWidth;
mDefaultRowHeight = rowHeight;