This repository was archived by the owner on Nov 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ private void onScrollEnd(MotionEvent event) {
189189
190190 @ Override
191191 public void onLongPress (MotionEvent e ) {
192- boolean onLongPressHandled = pdfView .callbacks .callOnLongPress (e );
192+ pdfView .callbacks .callOnLongPress (e );
193193 }
194194
195195 @ Override
Original file line number Diff line number Diff line change @@ -162,8 +162,10 @@ public void setOnLongPress(OnLongPressListener onLongPressListener) {
162162 this .onLongPressListener = onLongPressListener ;
163163 }
164164
165- public boolean callOnLongPress (MotionEvent event ) {
166- return onLongPressListener != null && onLongPressListener .onLongPress (event );
165+ public void callOnLongPress (MotionEvent event ) {
166+ if (onLongPressListener != null ) {
167+ onLongPressListener .onLongPress (event );
168+ }
167169 }
168170
169171 public void setLinkHandler (LinkHandler linkHandler ) {
Original file line number Diff line number Diff line change 1919
2020/**
2121 * Implement this interface to receive events from PDFView
22- * when view has been touched
22+ * when view has been long pressed
2323 */
2424public interface OnLongPressListener {
2525
2626 /**
2727 * Called when the user has a long tap gesture, before processing scroll handle toggling
2828 *
29- * @param e MotionEvent that registered as a confirmed long tap
30- * @return true if the long tap was handled, false to toggle scroll handle
29+ * @param e MotionEvent that registered as a confirmed long press
3130 */
32- boolean onLongPress (MotionEvent e );
31+ void onLongPress (MotionEvent e );
3332}
You can’t perform that action at this time.
0 commit comments