summaryrefslogtreecommitdiff
path: root/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java')
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
index 38c13ca345f6..99f994864234 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java
@@ -156,6 +156,19 @@ public class LOKitShell {
public static void sendNavigationClickEvent() {
LOKitShell.sendEvent(new LOEvent(LOEvent.NAVIGATION_CLICK));
}
+
+ /**
+ * Move the viewport to the desired point, and change the zoom level.
+ * Ensure this runs on the UI thread.
+ */
+ public static void moveViewportTo(final PointF position, final Float zoom) {
+ getLayerView().getLayerClient().post(new Runnable() {
+ @Override
+ public void run() {
+ getLayerView().getLayerClient().moveTo(position, zoom);
+ }
+ });
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */