diff options
| author | Satoshi Kataoka <satok@google.com> | 2013-12-13 04:15:33 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-12-13 04:15:33 +0000 |
| commit | 18d033405c18a8dc28f60ca22d1d0df23a679384 (patch) | |
| tree | 77ae6dc696eb7f2942e6d5bfebdccb95eebf8a6e /java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java | |
| parent | 95050f54e92ff5465e713990315e8cf421836a64 (diff) | |
| parent | c95efbbd575239b97db20b71fb347b543b5808f8 (diff) | |
Merge branch 'master' of https://googleplex-android.googlesource.com/_direct/platform/packages/inputmethods/LatinIME
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java index a7c468538..973128d36 100644 --- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java @@ -52,7 +52,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel final Resources res = context.getResources(); mKeyDetector = new MoreKeysDetector( - res.getDimension(R.dimen.config_more_keys_keyboard_slide_allowance)); + res.getDimension(R.dimen.more_keys_keyboard_slide_allowance)); } @Override @@ -81,13 +81,11 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel mListener = listener; final View container = getContainerView(); // The coordinates of panel's left-top corner in parentView's coordinate system. - // We need to consider background drawable paddings. - final int x = pointX - getDefaultCoordX() - container.getPaddingLeft() - getPaddingLeft(); - final int y = pointY - container.getMeasuredHeight() + container.getPaddingBottom() - + getPaddingBottom(); + final int x = pointX - getDefaultCoordX() - container.getPaddingLeft(); + final int y = pointY - container.getMeasuredHeight() + container.getPaddingBottom(); parentView.getLocationInWindow(mCoordinates); - // Ensure the horizontal position of the panel does not extend past the parentView edges. + // 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 panelY = y + CoordinateUtils.y(mCoordinates); |
