Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 47e38cf

Browse files
committed
Fix file name
Remove not implemented return value
1 parent cc06815 commit 47e38cf

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/DragPinchManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/listener/Callbacks.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/listener/OnLongTapListener.java renamed to android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/listener/OnLongPressListener.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
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
*/
2424
public 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
}

0 commit comments

Comments
 (0)