/// <summary>Cancels and clears all touch targets.</summary> /// <remarks>Cancels and clears all touch targets.</remarks> private void cancelAndClearTouchTargets(android.view.MotionEvent @event) { if (mFirstTouchTarget != null) { bool syntheticEvent = false; if (@event == null) { long now = android.os.SystemClock.uptimeMillis(); @event = android.view.MotionEvent.obtain(now, now, android.view.MotionEvent.ACTION_CANCEL , 0.0f, 0.0f, 0); @event.setSource(android.view.InputDevice.SOURCE_TOUCHSCREEN); syntheticEvent = true; } { for (android.view.ViewGroup.TouchTarget target = mFirstTouchTarget; target != null ; target = target.next) { resetCancelNextUpFlag(target.child); dispatchTransformedTouchEvent(@event, true, target.child, target.pointerIdBits); } } clearTouchTargets(); if (syntheticEvent) { @event.recycle(); } } }
public override void sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent @event) { // this class fires events only when tabs are focused or selected if (@event.getEventType() == android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED && isFocused()) { @event.recycle(); return; } base.sendAccessibilityEventUnchecked(@event); }