diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2013-08-28 08:58:57 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2013-08-28 16:33:54 +0900 |
| commit | 803ea61d552e9c1df34f5d58f1e59e5b7612d6e1 (patch) | |
| tree | 7fa725cbadfeeb49263b742eb01fe8ff449dd512 /java/src/com/android/inputmethod/keyboard/Key.java | |
| parent | b7eae3ffa4c25aa70adae7e410a244d3acf21307 (diff) | |
Add recents keyboard
Bug: 6370846
Change-Id: I5dc235395fe9b3bd95711fee2fe9b678b4660760
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/Key.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/Key.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/Key.java b/java/src/com/android/inputmethod/keyboard/Key.java index 143c6e848..3ea68806b 100644 --- a/java/src/com/android/inputmethod/keyboard/Key.java +++ b/java/src/com/android/inputmethod/keyboard/Key.java @@ -764,8 +764,9 @@ public class Key implements Comparable<Key> { } public final int getDrawX() { + final int x = getX(); final OptionalAttributes attrs = mOptionalAttributes; - return (attrs == null) ? mX : mX + attrs.mVisualInsetsLeft; + return (attrs == null) ? x : x + attrs.mVisualInsetsLeft; } public final int getDrawWidth() { @@ -823,9 +824,9 @@ public class Key implements Comparable<Key> { * @return the square of the distance of the point from the nearest edge of the key */ public int squaredDistanceToEdge(final int x, final int y) { - final int left = mX; + final int left = getX(); final int right = left + mWidth; - final int top = mY; + final int top = getY(); final int bottom = top + mHeight; final int edgeX = x < left ? left : (x > right ? right : x); final int edgeY = y < top ? top : (y > bottom ? bottom : y); |
