Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

17
  • excellent, thanks for this refactor. I was getting issues with the above approach when scrolling to the bottom of the listView as any touch behaviour over child elements started to not be intercepted no matter what the Y/X movement ratio. Weird! Commented Jan 25, 2012 at 20:06
  • 2
    Thanks! Also worked with a ViewPager inside a ListView, with a custom ListView. Commented Feb 16, 2012 at 6:55
  • 2
    Just replaced the accepted answer with this and it's working much better for me now. Thanks! Commented Jul 10, 2012 at 15:41
  • 1
    @VipinSahu, to tell the direction of touch move, you can take the delta of current X coordinate and lastX, if it is larger than 0, touch is moving from left to right, otherwise right to left. And then you save the current X as lastX for next calculation. Commented Aug 23, 2012 at 1:25
  • 1
    what about horizontal scrollview? Commented Dec 3, 2014 at 9:10