From 5e02930a7f40b704f357f127d3d38fbdc193ffa1 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Fri, 8 Oct 2010 12:51:15 +0900 Subject: Reduce delay before mini popup keyboard is shown Before this change, the delay was 500 ms that came from ViewConfiguration.getLongPressTimeout(). This change reduces the delay to 400 ms. Bug: 3074984 Change-Id: Ia5af5e877a3c4bb29211ef4040c728ac09a9fe85 --- java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java') diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java index 75ef691c8..bcd1bb056 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java @@ -154,7 +154,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx } // Timing constants - private static final int REPEAT_INTERVAL = PointerTracker.REPEAT_INTERVAL; + private final int mKeyRepeatInterval; // Miscellaneous constants /* package */ static final int NOT_A_KEY = -1; @@ -261,7 +261,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx case MSG_REPEAT_KEY: { final PointerTracker tracker = (PointerTracker)msg.obj; tracker.repeatKey(msg.arg1); - startKeyRepeatTimer(REPEAT_INTERVAL, msg.arg1, tracker); + startKeyRepeatTimer(mKeyRepeatInterval, msg.arg1, tracker); break; } case MSG_LONGPRESS_KEY: { @@ -542,6 +542,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx mHasDistinctMultitouch = context.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT); + mKeyRepeatInterval = res.getInteger(R.integer.config_key_repeat_interval); } public void setOnKeyboardActionListener(OnKeyboardActionListener listener) { @@ -1218,7 +1219,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx // Create pointer trackers until we can get 'id+1'-th tracker, if needed. for (int i = pointers.size(); i <= id; i++) { final PointerTracker tracker = - new PointerTracker(i, mHandler, mKeyDetector, this, mHasDistinctMultitouch); + new PointerTracker(i, mHandler, mKeyDetector, this, getResources()); if (keys != null) tracker.setKeyboard(keys, mKeyHysteresisDistance); if (listener != null) -- cgit v1.2.3-83-g751a