diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-04-13 19:25:09 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-04-13 19:33:07 +0900 |
commit | 3c4fd27392bd153e043eeb60907eeded48c60cf2 (patch) | |
tree | 5c82dbf754f97342fa8a74c38080e263d4431d46 /android | |
parent | 98b12bf77f3fa14749df1c8689b97f680aa6af32 (diff) |
android: hide the keyboard when scrolling velocity exceeds 18
Change-Id: Ibc3c1e384e73f0ecdd10f5a0c8972a04e4101a59
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java index f8b39b4f1453..eac6b1bb4143 100644 --- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java +++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java @@ -274,6 +274,11 @@ public class JavaPanZoomController } private boolean handleTouchMove(MotionEvent event) { + if (mState == PanZoomState.PANNING_LOCKED || mState == PanZoomState.PANNING) { + if (getVelocity() > 18.0f) { + LibreOfficeMainActivity.mAppContext.hideSoftKeyboard(); + } + } switch (mState) { case FLING: @@ -418,7 +423,6 @@ public class JavaPanZoomController } else { setState(PanZoomState.PANNING); } - //LibreOfficeMainActivity.mAppContext.hideSoftKeyboard(); } private float panDistance(MotionEvent move) { |