shalskar / PeekAndPop

496 stars 65 forks source link

Multiple parent view groups #19

Closed eyrdor closed 7 years ago

eyrdor commented 7 years ago

I had an issue where I had a recyclerview within a viewpager view. When peeking, if I was to swipe either to the right or left, the ACTION_CANCEL event would be called causing the view to be popped. Digging further, I realised this was caused by the viewpager receiving touch events (note - I was already disallowing touch events for the recyclerview). I went digging into your code and made a few tiny changes to get things to work: Rather than having 1 parentviewgroup to disallow intercept touch events, allow having a list of them.