internal OnTouchListener(NativeGestureHandler nativeGestureHandler) { P42.Utils.Debug.AddToCensus(this); _nativeGestureHandler = nativeGestureHandler; _nativeListener = new NativeGestureListener(_nativeGestureHandler.Renderer.View, _nativeGestureHandler.Element); _nativeDetector = new NativeGestureDetector(Droid.Settings.Context, _nativeListener); }
internal void ClearGestureRecognizers() { nativeDetector?.Dispose(); nativeDetector = null; nativeListener?.Dispose(); nativeListener = null; RemoveTouchHandler(); }
internal void ResetGestureRecognizers(Android.Views.View view) { ClearGestureRecognizers(); nativeListener = new NativeGestureListener(view, _listeners); nativeDetector = new NativeGestureDetector(Droid.Settings.Context, nativeListener); view.Touch += HandleTouch; //_weakReferenceView = new Java.Lang.Ref.WeakReference(view); }
internal OnTouchListener(NativeGestureHandler nativeGestureHandler) { P42.Utils.DebugExtensions.AddToCensus(this); _nativeGestureHandler = nativeGestureHandler; _nativeListener = new NativeGestureListener(_nativeGestureHandler.Renderer.View, _nativeGestureHandler.Element); Xamarin.Essentials.MainThread.BeginInvokeOnMainThread(() => _nativeDetector = new NativeGestureDetector(Droid.Settings.Context, _nativeListener)); }
protected override void Dispose(bool disposing) { if (!_disposedValue) { _listener = null; IsLongpressEnabled = false; _disposedValue = true; } base.Dispose(disposing); }
//int _lastEventPointerCount; public NativeGestureDetector(Context context, NativeGestureListener listener) : base(context, listener) { _listener = listener; IsLongpressEnabled = false; _avgCoords = new MotionEvent.PointerCoords[6]; for (int i = 0; i < 6; i++) { _avgCoords[i] = new MotionEvent.PointerCoords(); } }
protected override void Dispose(bool disposing) { if (disposing) { _nativeDetector?.Dispose(); _nativeDetector = null; _nativeListener?.Dispose(); _nativeListener = null; _nativeGestureHandler = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (!_disposed && disposing) { _disposed = true; _nativeDetector?.Dispose(); _nativeDetector = null; _nativeListener?.Dispose(); _nativeListener = null; //_nativeGestureHandler?.Dispose(); _nativeGestureHandler = null; P42.Utils.DebugExtensions.RemoveFromCensus(this); } base.Dispose(disposing); }
internal OnTouchListener(NativeGestureHandler nativeGestureHandler) { _nativeGestureHandler = nativeGestureHandler; _nativeListener = new NativeGestureListener(_nativeGestureHandler.Renderer.View, _nativeGestureHandler.Element); _nativeDetector = new NativeGestureDetector(Droid.Settings.Context, _nativeListener); }
internal DownUpGestureDetector(DownUpGestureListener downupListener, NativeGestureListener listener) { DownUpListener = downupListener; SimpleListener = listener; }