aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-05-24 23:52:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-24 23:52:12 -0700
commit598a25d990d59794e85ead8e77f9d738af786ab6 (patch)
tree14ab33d6d6da37c04d2b77e7ba28a26669e63669 /java/src
parentd3ab465c5ba4709620882f9867806736103c8749 (diff)
parente07b51e7c65220ac183546103010dd617d164f60 (diff)
downloadlatinime-598a25d990d59794e85ead8e77f9d738af786ab6.tar.gz
latinime-598a25d990d59794e85ead8e77f9d738af786ab6.tar.xz
latinime-598a25d990d59794e85ead8e77f9d738af786ab6.zip
Merge "Enable long press even if the key is disabled"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardView.java2
-rw-r--r--java/src/com/android/inputmethod/keyboard/PointerTracker.java2
-rw-r--r--java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java6
3 files changed, 5 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index 1df6444a0..1e7a0618e 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -876,6 +876,8 @@ public class KeyboardView extends View implements PointerTracker.UIProxy {
// Dismiss key preview (in this case, slide language switcher) without any delay.
mPreviewText.setVisibility(View.INVISIBLE);
}
+ // Clear key preview display position.
+ mKeyPreviewPopupDisplayedY = -1;
}
private void addKeyPreview(TextView keyPreview) {
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
index a489245aa..6b4e9469f 100644
--- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java
+++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java
@@ -633,8 +633,6 @@ public class PointerTracker {
private void startLongPressTimer(int keyIndex) {
Key key = getKey(keyIndex);
- if (!key.mEnabled)
- return;
if (key.mCode == Keyboard.CODE_SHIFT) {
mHandler.startLongPressShiftTimer(mLongPressShiftKeyTimeout, keyIndex, this);
} else if (key.mManualTemporaryUpperCaseCode != Keyboard.CODE_DUMMY
diff --git a/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java b/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java
index 561dcbcef..62a32cf3c 100644
--- a/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/PopupMiniKeyboardView.java
@@ -16,8 +16,6 @@
package com.android.inputmethod.keyboard;
-import com.android.inputmethod.latin.R;
-
import android.content.Context;
import android.content.res.Resources;
import android.os.SystemClock;
@@ -27,6 +25,8 @@ import android.view.MotionEvent;
import android.view.View;
import android.widget.PopupWindow;
+import com.android.inputmethod.latin.R;
+
/**
* A view that renders a virtual {@link MiniKeyboard}. It handles rendering of keys and detecting
* key presses and touch movements.
@@ -84,7 +84,7 @@ public class PopupMiniKeyboardView extends KeyboardView implements PopupPanel {
+ parentKeyboardView.getPaddingTop() + mCoordinates[1];
final int x = miniKeyboardX;
final int y = parentKeyboardView.isKeyPreviewPopupEnabled() &&
- miniKeyboard.isOneRowKeyboard() ? keyPreviewY : miniKeyboardY;
+ miniKeyboard.isOneRowKeyboard() && keyPreviewY >= 0 ? keyPreviewY : miniKeyboardY;
if (miniKeyboard.setShifted(parentKeyboard.isShiftedOrShiftLocked())) {
invalidateAllKeys();