From be68b41ccb1a16201c3b91f1576a731f7715aaf6 Mon Sep 17 00:00:00 2001 From: Tom Ouyang Date: Thu, 13 Dec 2012 20:57:50 -0800 Subject: [PATCH] Fix more suggestion window asymmetry bug in N7. Bug: 7711822 Change-Id: I63ba13b1c160cf55b8820a08e6e28fa666dd2580 --- .../com/android/inputmethod/keyboard/MoreKeysKeyboardView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java index ce2a8ad05..d7186d39f 100644 --- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java @@ -95,7 +95,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel parentView.getLocationInWindow(mCoordinates); // Ensure the horizontal position of the panel does not extend past the screen edges. final int maxX = parentView.getMeasuredWidth() - container.getMeasuredWidth(); - final int panelX = Math.max(0, Math.min(maxX, x + CoordinateUtils.x(mCoordinates))); + final int panelX = Math.max(0, Math.min(maxX, x)) + CoordinateUtils.x(mCoordinates); final int panelY = y + CoordinateUtils.y(mCoordinates); container.setX(panelX); container.setY(panelY);