Dismiss the more suggestions when the user is sliding down the touch point
Bug: 5299142 Change-Id: I466ff41948bbb49fb6874817ecfd94d338238d19
This commit is contained in:
parent
cd15b9300f
commit
87104bace9
1 changed files with 4 additions and 5 deletions
|
@ -792,11 +792,10 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
||||||
final int translatedY = moreKeysPanel.translateY(y);
|
final int translatedY = moreKeysPanel.translateY(y);
|
||||||
|
|
||||||
if (mCheckingIfModalOrSlidingMode) {
|
if (mCheckingIfModalOrSlidingMode) {
|
||||||
final int deltaX = Math.abs(x - mOriginX);
|
if (Math.abs(x - mOriginX) >= mMoreSuggestionsModalTolerance
|
||||||
final int deltaY = Math.abs(y - mOriginY);
|
|| mOriginY - y >= mMoreSuggestionsModalTolerance) {
|
||||||
if (deltaX >= mMoreSuggestionsModalTolerance
|
// Decided to be in the sliding input mode only when the touch point has been moved
|
||||||
|| deltaY >= mMoreSuggestionsModalTolerance) {
|
// upward.
|
||||||
// Decided to be in the sliding input mode
|
|
||||||
mCheckingIfModalOrSlidingMode = false;
|
mCheckingIfModalOrSlidingMode = false;
|
||||||
tracker.onShowMoreKeysPanel(
|
tracker.onShowMoreKeysPanel(
|
||||||
translatedX, translatedY, SystemClock.uptimeMillis(), moreKeysPanel);
|
translatedX, translatedY, SystemClock.uptimeMillis(), moreKeysPanel);
|
||||||
|
|
Loading…
Reference in a new issue