Skip to content
Snippets Groups Projects
Commit 50fbe4cc authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Cancel keydown events immediately once the view starts scrolling"

parents 5a885e85 4c259866
No related branches found
No related tags found
No related merge requests found
...@@ -534,6 +534,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange ...@@ -534,6 +534,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange
@Override @Override
public void onPageScrolled(final int position, final float positionOffset, public void onPageScrolled(final int position, final float positionOffset,
final int positionOffsetPixels) { final int positionOffsetPixels) {
mEmojiPalettesAdapter.onPageScrolled();
final Pair<Integer, Integer> newPos = final Pair<Integer, Integer> newPos =
mEmojiCategory.getCategoryIdAndPageIdFromPagePosition(position); mEmojiCategory.getCategoryIdAndPageIdFromPagePosition(position);
final int newCategoryId = newPos.first; final int newCategoryId = newPos.first;
...@@ -718,6 +719,14 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange ...@@ -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 @Override
public int getCount() { public int getCount() {
return mEmojiCategory.getTotalPageCountOfAllCategories(); return mEmojiCategory.getTotalPageCountOfAllCategories();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment