[Libreoffice-commits] core.git: 2 commits - android/experimental

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Mon Apr 13 03:34:03 PDT 2015


 android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java         |    8 ++++----
 android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java |    6 +++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 3c4fd27392bd153e043eeb60907eeded48c60cf2
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Apr 13 19:25:09 2015 +0900

    android: hide the keyboard when scrolling velocity exceeds 18
    
    Change-Id: Ibc3c1e384e73f0ecdd10f5a0c8972a04e4101a59

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 f8b39b4..eac6b1b 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) {
commit 98b12bf77f3fa14749df1c8689b97f680aa6af32
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri Apr 10 17:43:55 2015 +0900

    android: transition first, then move the viewport to the cursor
    
    Change-Id: Iabc9b45dc3198472adda9b6fad1d531c41635f00

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
index 1fdc681..0c67103 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
@@ -156,14 +156,14 @@ public class InvalidationHandler implements Document.MessageCallback {
             mDocumentOverlay.positionCursor(cursorRectangle);
             mDocumentOverlay.positionHandle(SelectionHandle.HandleType.MIDDLE, cursorRectangle);
 
+            if (mState == OverlayState.TRANSITION || mState == OverlayState.CURSOR) {
+                changeStateTo(OverlayState.CURSOR);
+            }
+
             if (mKeyEvent) {
                 moveViewportToMakeCursorVisible(cursorRectangle);
                 mKeyEvent = false;
             }
-
-            if (mState == OverlayState.TRANSITION || mState == OverlayState.CURSOR) {
-                changeStateTo(OverlayState.CURSOR);
-            }
         }
     }
 


More information about the Libreoffice-commits mailing list