diff options
author | 2010-08-25 21:27:13 +0900 | |
---|---|---|
committer | 2010-08-26 18:08:12 +0900 | |
commit | 542f057ef64ae16cf2bc528880cf32bfd073edad (patch) | |
tree | 16f6c0f0c753f0b4caff4a293b7c9b174149f91d /java/src/com/android/inputmethod/latin/LatinKeyboardView.java | |
parent | 0c5480989186c884a1a296ac2f46132235d02d45 (diff) | |
download | latinime-542f057ef64ae16cf2bc528880cf32bfd073edad.tar.gz latinime-542f057ef64ae16cf2bc528880cf32bfd073edad.tar.xz latinime-542f057ef64ae16cf2bc528880cf32bfd073edad.zip |
Add a log for getting coordinates of keys
Change-Id: I57cc6fb6a9eeb65ce8c0c3c3262fd525726643e2
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboardView.java | 18 |
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); |