This repository was archived by the owner on Nov 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ public void setSwipeVertical(boolean swipeVertical) {
8383 @ Override
8484 public boolean onSingleTapConfirmed (MotionEvent e ) {
8585 OnTapListener onTapListener = pdfView .getOnTapListener ();
86- if (onTapListener != null && !onTapListener .onTap (e )) {
86+ if (onTapListener == null || !onTapListener .onTap (e )) {
8787 ScrollHandle ps = pdfView .getScrollHandle ();
8888 if (ps != null && !pdfView .documentFitsView ()) {
8989 if (!ps .shown ()) {
Original file line number Diff line number Diff line change 1818import android .view .MotionEvent ;
1919
2020/**
21- * Implements this interface to receive events from PDFView
22- * when a page has been scrolled
21+ * Implement this interface to receive events from PDFView
22+ * when view has been touched
2323 */
2424public interface OnTapListener {
2525
2626 /**
27- * Called when the user has a tap gesture, before processing scroll toggling.
27+ * Called when the user has a tap gesture, before processing scroll handle toggling
2828 *
2929 * @param e MotionEvent that registered as a confirmed single tap
30- * @return true if the single tap was handled
30+ * @return true if the single tap was handled, false to toggle scroll handle
3131 */
3232 boolean onTap (MotionEvent e );
3333}
You can’t perform that action at this time.
0 commit comments