コード例 #1
0
        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);
        }
コード例 #2
0
 internal void ClearGestureRecognizers()
 {
     nativeDetector?.Dispose();
     nativeDetector = null;
     nativeListener?.Dispose();
     nativeListener = null;
     RemoveTouchHandler();
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: OnTouchListener.cs プロジェクト: wx0322/Forms9Patch
        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));
        }
コード例 #5
0
 protected override void Dispose(bool disposing)
 {
     if (!_disposedValue)
     {
         _listener          = null;
         IsLongpressEnabled = false;
         _disposedValue     = true;
     }
     base.Dispose(disposing);
 }
コード例 #6
0
        //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();
            }
        }
コード例 #7
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _nativeDetector?.Dispose();
         _nativeDetector = null;
         _nativeListener?.Dispose();
         _nativeListener       = null;
         _nativeGestureHandler = null;
     }
     base.Dispose(disposing);
 }
コード例 #8
0
ファイル: OnTouchListener.cs プロジェクト: wx0322/Forms9Patch
        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);
        }
コード例 #9
0
 internal OnTouchListener(NativeGestureHandler nativeGestureHandler)
 {
     _nativeGestureHandler = nativeGestureHandler;
     _nativeListener       = new NativeGestureListener(_nativeGestureHandler.Renderer.View, _nativeGestureHandler.Element);
     _nativeDetector       = new NativeGestureDetector(Droid.Settings.Context, _nativeListener);
 }
コード例 #10
0
 internal DownUpGestureDetector(DownUpGestureListener downupListener, NativeGestureListener listener)
 {
     DownUpListener = downupListener;
     SimpleListener = listener;
 }