aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-08-26 02:14:14 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-26 02:14:14 -0700
commitc3da8084ea3759e9a86055c7628b109f9fca8149 (patch)
treee51da90be0de321abc034d78ff5721f67c560ba0 /java/src/com/android/inputmethod/latin/LatinKeyboardView.java
parent0b60d0f619026c218968ae56f04b018243af5c80 (diff)
parent3a196bb92846a44283be40170e4b97908ced3031 (diff)
downloadlatinime-c3da8084ea3759e9a86055c7628b109f9fca8149.tar.gz
latinime-c3da8084ea3759e9a86055c7628b109f9fca8149.tar.xz
latinime-c3da8084ea3759e9a86055c7628b109f9fca8149.zip
am 3a196bb9: am 542f057e: Add a log for getting coordinates of keys
Merge commit '3a196bb92846a44283be40170e4b97908ced3031' * commit '3a196bb92846a44283be40170e4b97908ced3031': Add a log for getting coordinates of keys
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinKeyboardView.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
index 38d9cefb1..e57abd2c5 100644
--- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java
@@ -96,15 +96,21 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
@Override
protected boolean onLongPress(Key key) {
if (key.codes[0] == Keyboard.KEYCODE_MODE_CHANGE) {
- getOnKeyboardActionListener().onKey(KEYCODE_OPTIONS, null);
+ getOnKeyboardActionListener().onKey(KEYCODE_OPTIONS, null,
+ LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE,
+ LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE);
return true;
} else if (key.codes[0] == Keyboard.KEYCODE_SHIFT) {
- getOnKeyboardActionListener().onKey(KEYCODE_SHIFT_LONGPRESS, null);
+ getOnKeyboardActionListener().onKey(KEYCODE_SHIFT_LONGPRESS, null,
+ LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE,
+ LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE);
invalidateAllKeys();
return true;
} else if (key.codes[0] == '0' && getKeyboard() == mPhoneKeyboard) {
// Long pressing on 0 in phone number keypad gives you a '+'.
- getOnKeyboardActionListener().onKey('+', null);
+ getOnKeyboardActionListener().onKey(
+ '+', null, LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE,
+ LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE);
return true;
} else {
return super.onLongPress(key);
@@ -235,7 +241,7 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
if (languageDirection != 0) {
getOnKeyboardActionListener().onKey(
languageDirection == 1 ? KEYCODE_NEXT_LANGUAGE : KEYCODE_PREV_LANGUAGE,
- null);
+ null, mLastX, mLastY);
me.setAction(MotionEvent.ACTION_CANCEL);
keyboard.keyReleased();
return super.onTouchEvent(me);
@@ -366,8 +372,8 @@ public class LatinKeyboardView extends LatinKeyboardBaseView {
ExtensionKeyboardListener(OnKeyboardActionListener target) {
mTarget = target;
}
- public void onKey(int primaryCode, int[] keyCodes) {
- mTarget.onKey(primaryCode, keyCodes);
+ public void onKey(int primaryCode, int[] keyCodes, int x, int y) {
+ mTarget.onKey(primaryCode, keyCodes, x, y);
}
public void onPress(int primaryCode) {
mTarget.onPress(primaryCode);