diff options
author | 2014-02-12 02:23:24 -0800 | |
---|---|---|
committer | 2014-02-12 02:23:24 -0800 | |
commit | a8a06ad6d4a30044c102e03bf053c504fabac9b7 (patch) | |
tree | d11b2a908d35fb5db7ad6e5e7d9c7d68d8f0a2a8 /java | |
parent | 71a6277e876a0f692da598c6c18cc2fbc61f2f01 (diff) | |
parent | 50fbe4cc09e9ee98f94f3a90b1353ec22ac149c7 (diff) | |
download | latinime-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.java | 9 |
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(); |