public override bool OnInterceptTouchEvent(MotionEvent ev) { if (!Enabled) { return(true); } if (_watchForLongPress) { LongPressGestureDetector.OnTouchEvent(ev); } return(base.OnInterceptTouchEvent(ev)); }
public override bool DispatchTouchEvent(MotionEvent e) { // Give the child controls a shot at the event (in case they've get Tap gestures and such var handled = base.DispatchTouchEvent(e); if (_watchForLongPress) { // Feed the gestue through the LongPress detector; for this to wor we *must* return true // afterward (or the LPGD goes nuts and immediately fires onLongPress) LongPressGestureDetector.OnTouchEvent(e); return(true); } return(handled); }