diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-18 15:49:48 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-19 11:03:42 +0300 |
commit | bf2a1812a4e4233c08f9432ce765f87d1b57727e (patch) | |
tree | a398402e24aa54c5808c5749644acc136e4d8f41 /android | |
parent | Java cleanup, use generics in calls to UnoRuntime#queryInterface (diff) | |
download | core-bf2a1812a4e4233c08f9432ce765f87d1b57727e.tar.gz core-bf2a1812a4e4233c08f9432ce765f87d1b57727e.zip |
Attempt to avoid popping up keyboard after panning
Change-Id: Ie5639ea5a2c50e54ab880ac850287de07ff69959
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java index 5fb59f20ddd0..5e3f15bf694e 100644 --- a/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java +++ b/android/experimental/desktop/src/org/libreoffice/experimental/desktop/Desktop.java @@ -282,6 +282,7 @@ public class Desktop @Override public boolean onTouchEvent(MotionEvent event) { + boolean scrollJustEnded = false; if (event.getPointerCount() == 1 && gestureDetector.onTouchEvent(event)) { return true; @@ -298,6 +299,7 @@ public class Desktop Desktop.scroll((int) translateX, (int) translateY); translateX = translateY = 0; scrollInProgress = false; + scrollJustEnded = true; invalidate(); } else if (event.getPointerCount() == 2 && scaleDetector.onTouchEvent(event) && @@ -315,7 +317,9 @@ public class Desktop // the soft one unconditionally? But what if the user // wants to input in another script than what the hardware // keyboard covers? - if (event.getActionMasked() == MotionEvent.ACTION_UP) { + if (!scrollJustEnded && + event.getPointerCount() == 1 && + event.getActionMasked() == MotionEvent.ACTION_UP) { // show the keyboard so we can enter text InputMethodManager imm = (InputMethodManager) getContext() .getSystemService(Context.INPUT_METHOD_SERVICE); |