Skip to content

Commit 4cbf115

Browse files
committed
Add possibility to disable long click
1 parent 690e2cf commit 4cbf115

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ void disable() {
6363
enabled = false;
6464
}
6565

66+
void disableLongpress(){
67+
gestureDetector.setIsLongpressEnabled(false);
68+
}
69+
6670
@Override
6771
public boolean onSingleTapConfirmed(MotionEvent e) {
6872
boolean onTapHandled = pdfView.callbacks.callOnTap(e);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,6 +1470,11 @@ public Configurator nightMode(boolean nightMode) {
14701470
return this;
14711471
}
14721472

1473+
public Configurator disableLongpress() {
1474+
PDFView.this.dragPinchManager.disableLongpress();
1475+
return this;
1476+
}
1477+
14731478
public void load() {
14741479
if (!hasSize) {
14751480
waitingDocumentConfigurator = this;

0 commit comments

Comments
 (0)