public override bool DispatchTouchEvent(MotionEvent e)
{
switch (e.Action)
{
case MotionEventActions.Down:
_startX = e.RawX;
_startY = e.RawY;
Parent.RequestDisallowInterceptTouchEvent(true);
break;
case MotionEventActions.Move:
if (_isHorizontal * Math.Abs(_startX - e.RawX) < _isHorizontal * Math.Abs(_startY - e.RawY))
Parent.RequestDisallowInterceptTouchEvent(false);
break;
case MotionEventActions.Up:
Parent.RequestDisallowInterceptTouchEvent(false);
break;
}
return base.DispatchTouchEvent(e);
}
}