aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-02-12 02:23:24 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-12 02:23:24 -0800
commita8a06ad6d4a30044c102e03bf053c504fabac9b7 (patch)
treed11b2a908d35fb5db7ad6e5e7d9c7d68d8f0a2a8 /java
parent71a6277e876a0f692da598c6c18cc2fbc61f2f01 (diff)
parent50fbe4cc09e9ee98f94f3a90b1353ec22ac149c7 (diff)
downloadlatinime-a8a06ad6d4a30044c102e03bf053c504fabac9b7.tar.gz
latinime-a8a06ad6d4a30044c102e03bf053c504fabac9b7.tar.xz
latinime-a8a06ad6d4a30044c102e03bf053c504fabac9b7.zip
am 50fbe4cc: Merge "Cancel keydown events immediately once the view starts scrolling"
* commit '50fbe4cc09e9ee98f94f3a90b1353ec22ac149c7': Cancel keydown events immediately once the view starts scrolling
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
index 672759aee..b44741cda 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
+++ b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java
@@ -534,6 +534,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
@Override
public void onPageScrolled(final int position, final float positionOffset,
final int positionOffsetPixels) {
+ mEmojiPalettesAdapter.onPageScrolled();
final Pair<Integer, Integer> newPos =
mEmojiCategory.getCategoryIdAndPageIdFromPagePosition(position);
final int newCategoryId = newPos.first;
@@ -718,6 +719,14 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
}
}
+ public void onPageScrolled() {
+ // Make sure the delayed key-down event (highlight effect and haptic feedback) will be
+ // canceled.
+ final EmojiPageKeyboardView currentKeyboardView =
+ mActiveKeyboardViews.get(mActivePosition);
+ currentKeyboardView.releaseCurrentKey();
+ }
+
@Override
public int getCount() {
return mEmojiCategory.getTotalPageCountOfAllCategories();