Reputation: 497
So I'm working on an app and I have a listview that I want to switch activities on a two finger press, but as of now its not working with the list view on the page. It doesn't work when I set the listener on the whole relative layout or the lsitview itself? Is this something not acheiveable? Or is there a way to go about this? Any help is greatly appreciated.
Upvotes: 0
Views: 37
Reputation: 2383
Problem here seems to be that the listView is intercepting the touch events and not passing it to the parent container.
You can implement onInterceptTouchEvent on your ListView and pass it to your parent :
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
onTouchEvent(ev);
return false;
}
Upvotes: 1