Nancy, you donโt need to manually override page scrolling or touch events. Just add pages to the ViewPager, and ViewPager will automatically take care of scrolling.
However, you need to connect touch listeners to the object on each page. So, if on page 1 there is a linear layout with many buttons, and you need to know when these buttons will be pressed, you need to attach OnClickListeners to each of these buttons.
Let me know your use case so that we can better understand why you need to know when the page was clicked!
source share