Reputation: 561
I have a custom FrameLayout which overrides this method:
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
switch (ev.getAction()) {
case MotionEvent.ACTION_MOVE:
return interceptTouchEvents;
}
return false;
}
I then have a touch listener which I set as the TouchListener of this FrameLayout. At some point inside the onTouch method I'd like to forward this event to a children.
Upvotes: 1
Views: 497
Reputation: 1267
you can use below code for dispatch touch event to view, // Dispatch touch event to view
view.dispatchTouchEvent(motionEvent);
Hope this will help.
Thanks
Upvotes: 4