aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-11-20 08:42:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-11-20 08:42:34 +0000
commitd088e0e726b5417607e565687d45a02d33bfc244 (patch)
treeabd9a168fa0deecc4ad4e264cec07b612a9c79a4 /java/src
parent3a1be7e4cf1f1f30d02d50d142724731d02af90c (diff)
parent818ece917f5c46a2c4c437c0e03fdb88b0cf84f5 (diff)
downloadlatinime-d088e0e726b5417607e565687d45a02d33bfc244.tar.gz
latinime-d088e0e726b5417607e565687d45a02d33bfc244.tar.xz
latinime-d088e0e726b5417607e565687d45a02d33bfc244.zip
Merge "Don't draw key top letter when key preview is showing"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/MainKeyboardView.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 984e19e7d..9ba46202a 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -396,6 +396,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
previewTextView.setVisibility(INVISIBLE);
mainKeyboardView.mFreeKeyPreviewTextViews.add(previewTextView);
}
+ // To redraw key top letter.
+ mainKeyboardView.invalidateKey(key);
}
break;
case MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT:
@@ -1174,6 +1176,12 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
if (key.altCodeWhileTyping() && key.isEnabled()) {
params.mAnimAlpha = mAltCodeKeyWhileTypingAnimAlpha;
}
+ // Don't draw key top letter when key preview is showing.
+ if (mShowingKeyPreviewTextViews.containsKey(key)) {
+ // TODO: Fade out animation for the key top letter, and fade in animation for the key
+ // background color when the user presses the key.
+ return;
+ }
final int code = key.getCode();
if (code == Constants.CODE_SPACE) {
drawSpacebar(key, canvas, paint);