Package com.pspdfkit.listeners
Interface OnDocumentLongPressListener
-
- All Implemented Interfaces:
public interface OnDocumentLongPressListener
Listener for document long press events on the the PdfFragment.
-
-
Method Summary
Modifier and Type Method Description abstract boolean
onDocumentLongPress(@NonNull() PdfDocument document, @IntRange(from = 0) int pageIndex, @Nullable() MotionEvent event, @Nullable() PointF pagePosition, @Nullable() Annotation longPressedAnnotation)
Called when user long-press / long-clicks on the page. -
-
Method Detail
-
onDocumentLongPress
abstract boolean onDocumentLongPress(@NonNull() PdfDocument document, @IntRange(from = 0) int pageIndex, @Nullable() MotionEvent event, @Nullable() PointF pagePosition, @Nullable() Annotation longPressedAnnotation)
Called when user long-press / long-clicks on the page.
- Parameters:
document
- Currently opened document.pageIndex
- Page number of the page being long-pressed.event
- MotionEvent that triggered this page click.pagePosition
- Tapped page position (in PDF page coordinates with origin on bottom left).longPressedAnnotation
- Annotation that was long-tapped, ornull
if no annotation was long-tapped.- Returns:
true
if tap was handled by this OnDocumentLongPressListener and should not be handled by PSPDFKit anymore. If returningfalse
PSPDFKit will continue executing it's default action.
-
-
-
-