From 9a6a4d3d5f1ee52b56d349c002aa61c264d010d3 Mon Sep 17 00:00:00 2001 From: satok Date: Fri, 3 Sep 2010 04:25:31 +0900 Subject: Add a showing input method picker option by longpressing setting key Bug: 2959271 Change-Id: I4b7e9a2de3cbe17b168ed8d0541a9b1cd9a9e107 --- java/src/com/android/inputmethod/latin/LatinKeyboardView.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java') diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java index 7a993669b..9236d6820 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java @@ -32,6 +32,7 @@ import java.util.List; public class LatinKeyboardView extends LatinKeyboardBaseView { static final int KEYCODE_OPTIONS = -100; + static final int KEYCODE_OPTIONS_LONGPRESS = -101; static final int KEYCODE_VOICE = -102; static final int KEYCODE_F1 = -103; static final int KEYCODE_NEXT_LANGUAGE = -104; @@ -76,7 +77,12 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { @Override protected boolean onLongPress(Key key) { - if (key.codes[0] == '0' && getKeyboard() == mPhoneKeyboard) { + if (key.codes[0] == KEYCODE_OPTIONS) { + getOnKeyboardActionListener().onKey(KEYCODE_OPTIONS_LONGPRESS, null, + LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE, + LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE); + return true; + } else if (key.codes[0] == '0' && getKeyboard() == mPhoneKeyboard) { // Long pressing on 0 in phone number keypad gives you a '+'. getOnKeyboardActionListener().onKey( '+', null, LatinKeyboardBaseView.NOT_A_TOUCH_COORDINATE, -- cgit v1.2.3-83-g751a