am be68b41c: Fix more suggestion window asymmetry bug in N7.

* commit 'be68b41ccb1a16201c3b91f1576a731f7715aaf6':
  Fix more suggestion window asymmetry bug in N7.
This commit is contained in:
Tom Ouyang 2012-12-13 21:14:01 -08:00 committed by Android Git Automerger
commit e75a48cdbb

View File

@ -95,7 +95,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
parentView.getLocationInWindow(mCoordinates); parentView.getLocationInWindow(mCoordinates);
// Ensure the horizontal position of the panel does not extend past the screen edges. // Ensure the horizontal position of the panel does not extend past the screen edges.
final int maxX = parentView.getMeasuredWidth() - container.getMeasuredWidth(); 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); final int panelY = y + CoordinateUtils.y(mCoordinates);
container.setX(panelX); container.setX(panelX);
container.setY(panelY); container.setY(panelY);