Reputation: 16914
Let's say I have a ListView, and one row in it is a custom View of mine. The user touches inside the custom view -> custom View gets to handle this touch event. User continues this touch sequence inside the are of the custom View -> custom View gets to handle those events too.
Problem: When the user drags his/her finger outside the area of the custom View (the drag started inside), the custom View losts the touch events. But I need those events too, how can I achieve this?
I know that this can be done: if you put a Gallery containing a bunch of images inside a LisView, and I start to drag the Gallery left-right, and drag my finger outside the area of the Gallery while doing so (moving up/downwards too much), I still control the Gallery scrolling, not the ListView.
I hope that I was clear enough, does anyone have some tips on this problem?
Upvotes: 2
Views: 1248
Reputation: 2559
To get all following events I also had to call view.getParent().requestDisallowInterceptTouchEvent(true) in my onTouch Listener.
Upvotes: 2