diff options
Diffstat (limited to 'android/source/src/java/org/libreoffice/overlay/DocumentOverlay.java')
-rw-r--r-- | android/source/src/java/org/libreoffice/overlay/DocumentOverlay.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/android/source/src/java/org/libreoffice/overlay/DocumentOverlay.java b/android/source/src/java/org/libreoffice/overlay/DocumentOverlay.java index 8d90ef09fa4a..d9d2b372b714 100644 --- a/android/source/src/java/org/libreoffice/overlay/DocumentOverlay.java +++ b/android/source/src/java/org/libreoffice/overlay/DocumentOverlay.java @@ -32,6 +32,8 @@ public class DocumentOverlay { private final DocumentOverlayView mDocumentOverlayView; private final DocumentOverlayLayer mDocumentOverlayLayer; + private final long hidePageNumberRectDelayInMilliseconds = 500; + /** * DocumentOverlayLayer responsibility is to get the changes to the viewport * and report them to DocumentOverlayView. @@ -74,6 +76,10 @@ public class DocumentOverlay { mDocumentOverlayView.initialize(layerView); } + public void setPartPageRectangles(List<RectF> rectangles) { + mDocumentOverlayView.setPartPageRectangles(rectangles); + } + /** * Show the cursor at the defined cursor position on the overlay. */ @@ -97,6 +103,28 @@ public class DocumentOverlay { } /** + * Show the page number rectangle on the overlay. + */ + public void showPageNumberRect() { + LOKitShell.getMainHandler().post(new Runnable() { + public void run() { + mDocumentOverlayView.showPageNumberRect(); + } + }); + } + + /** + * Hide the page number rectangle on the overlay. + */ + public void hidePageNumberRect() { + LOKitShell.getMainHandler().postDelayed(new Runnable() { + public void run() { + mDocumentOverlayView.hidePageNumberRect(); + } + }, hidePageNumberRectDelayInMilliseconds); + } + + /** * Position the cursor to the input position on the overlay. */ public void positionCursor(final RectF position) { |