Trinea / android-auto-scroll-view-pager

Android auto scroll viewpager or viewpager in viewpager
http://p.codekk.com/
Apache License 2.0
1.67k stars 670 forks source link

Clicking while scrolling doesn't invoke the clickListener #26

Open Ibrahemalbitar opened 8 years ago

Ibrahemalbitar commented 8 years ago

If I click the pager while the scroll is taking place, the pager sometimes fast-scrolls to the next item, and sometimes to the previous one. I have an onClick() event listener on each pager item that should open another activity. I need this listener to keep working even if the pager was clicked during the transition.

Is there a way to implement this?

Note: your demo Android application (Trinea Android demo) shows the undesired behaviour in the “AutoScrollViewPager demo”, but the problem doesn’t occur when we further navigate into the “AutoScrollViewPager demo >ViewPager in ViewPager Demo” page.

mspmax commented 7 years ago

You should remove getParent().requestDisallowInterceptTouchEvent(true) in dispatchTouchEvent() method. I guess this is a bug