am 206ce637: am bd8e92d8: Add debug message to detect unusual zero width condition
* commit '206ce6374bb4dfcb93d059ec6795853f36cd4979': Add debug message to detect unusual zero width conditionmain
commit
46762bf521
|
@ -291,10 +291,22 @@ public final class MoreKeysKeyboard extends Keyboard {
|
||||||
// adjusted with their bottom paddings deducted.
|
// adjusted with their bottom paddings deducted.
|
||||||
width = keyPreviewDrawParams.mPreviewVisibleWidth;
|
width = keyPreviewDrawParams.mPreviewVisibleWidth;
|
||||||
height = keyPreviewDrawParams.mPreviewVisibleHeight + mParams.mVerticalGap;
|
height = keyPreviewDrawParams.mPreviewVisibleHeight + mParams.mVerticalGap;
|
||||||
|
// TODO: Remove this check.
|
||||||
|
if (width == 0) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Zero width key detected: " + parentKey + " in " + parentKeyboard.mId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
width = getMaxKeyWidth(parentKeyboardView, parentKey, mParams.mDefaultKeyWidth,
|
width = getMaxKeyWidth(parentKeyboardView, parentKey, mParams.mDefaultKeyWidth,
|
||||||
context.getResources());
|
context.getResources());
|
||||||
height = parentKeyboard.mMostCommonKeyHeight;
|
height = parentKeyboard.mMostCommonKeyHeight;
|
||||||
|
// TODO: Remove this check.
|
||||||
|
if (width == 0) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Zero width calculated: " + parentKey
|
||||||
|
+ " moreKeys=" + java.util.Arrays.toString(parentKey.mMoreKeys)
|
||||||
|
+ " in " + parentKeyboard.mId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
final int dividerWidth;
|
final int dividerWidth;
|
||||||
if (parentKey.needsDividersInMoreKeys()) {
|
if (parentKey.needsDividersInMoreKeys()) {
|
||||||
|
|
Loading…
Reference in New Issue