Hi Davide,
I see that the PDFViewPager allows to zoom in on a pdf page, and scroll the page completely, before switching to the second page.
This component makes use of PDFPageView, which I think handles the 'scroll to edge before viewpager scroll' behaviour.
However, the PDFLayoutView does not make use of PDFPageView.
So, based on PDFPageView, I created CustomPDFLayoutView, extending PDFLayoutView.
Overriding onTouchEvent
public class CustomPdfLayoutView extends PDFLayoutView {
@Override
public boolean onTouchEvent(MotionEvent event) {
try {
if(this.onTouchZoom(event)) {
this.getParent().requestDisallowInterceptTouchEvent(true);
return true;
} else {
boolean bOK = this.onTouchNone(event);
this.getParent().requestDisallowInterceptTouchEvent(bOK);
return bOK;
}
} catch (Exception var3) {
return false;
}
}
}
This allows me to scroll and zoom the pdf without scrolling the viewpager.
BUT, now the viewpager does not scroll anymore, whatsoever.