Example #1
0
		/// <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();
				}
			}
		}
Example #2
0
		public override void onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent
			 @event)
		{
			if (@event.getEventType() == android.view.accessibility.AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED)
			{
				// Action mode started
				@event.setSource(this);
				@event.setClassName(java.lang.CharSequenceProxy.Wrap(GetType().FullName));
				@event.setPackageName(java.lang.CharSequenceProxy.Wrap(getContext().getPackageName
					()));
				@event.setContentDescription(mTitle);
			}
			else
			{
				base.onInitializeAccessibilityEvent(@event);
			}
		}