am cee512b6
: Merge "More precise geometry checking for more keys keyboard"
* commit 'cee512b63ed74ed6d9dab25bd1c19376fe98e1ce': More precise geometry checking for more keys keyboard
This commit is contained in:
commit
1dc7fd3f80
1 changed files with 3 additions and 2 deletions
|
@ -73,10 +73,11 @@ public final class MoreKeysKeyboard extends Keyboard {
|
||||||
final int rowHeight, final int coordXInParent, final int parentKeyboardWidth,
|
final int rowHeight, final int coordXInParent, final int parentKeyboardWidth,
|
||||||
final boolean isFixedColumnOrder, final int dividerWidth) {
|
final boolean isFixedColumnOrder, final int dividerWidth) {
|
||||||
mIsFixedOrder = isFixedColumnOrder;
|
mIsFixedOrder = isFixedColumnOrder;
|
||||||
if (parentKeyboardWidth / keyWidth < maxColumns) {
|
if (parentKeyboardWidth / keyWidth < Math.min(numKeys, maxColumns)) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Keyboard is too small to hold more keys keyboard: "
|
"Keyboard is too small to hold more keys keyboard: "
|
||||||
+ parentKeyboardWidth + " " + keyWidth + " " + maxColumns);
|
+ parentKeyboardWidth + " " + keyWidth + " "
|
||||||
|
+ numKeys + " " + maxColumns);
|
||||||
}
|
}
|
||||||
mDefaultKeyWidth = keyWidth;
|
mDefaultKeyWidth = keyWidth;
|
||||||
mDefaultRowHeight = rowHeight;
|
mDefaultRowHeight = rowHeight;
|
||||||
|
|
Loading…
Reference in a new issue