public CustomFrameRenderer(Context context) : base(context)
 {
     _listener = new GestureDetector.SimpleOnGestureListener();
     _detector = new GestureDetector(context, _listener)
     {
         IsLongpressEnabled = true
     };
 }
Exemplo n.º 2
0
        public SwipeHelper(Context context, RecyclerView recyclerView, int buttonWidth) : base(0, ItemTouchHelper.Left)
        {
            this.recyclerView  = recyclerView;
            this.buttonHelpers = new List <ButtonHelper>();
            this.buttonBuffer  = new Dictionary <int, List <ButtonHelper> >();
            this.buttonWidth   = buttonWidth;

            simpleOnGestureListener = new GestureListenerHelper(this);
            onTouchListener         = new TouchListenerHelper(this);
            this.gestureDetector    = new GestureDetector(context, simpleOnGestureListener);
            this.recyclerView.SetOnTouchListener(onTouchListener);
            AttachSwipe();
        }
 public ZoomableTouchListener(ITargetContainer targetContainer, View view, ViewerConfig config, IInterpolator interpolator, IZoomListener zoomListener, ITapListener tapListener, ILongPressListener longPressListener, IDoubleTapListener doubleTapListener)
 {
     this.TargetContainer        = targetContainer;
     this.Target                 = view;
     this.Config                 = config;
     this.EndZoomingInterpolator = interpolator ?? new AccelerateDecelerateInterpolator();
     this.ScaleGestureDetector   = new ScaleGestureDetector(view.Context, this);
     this.GestureDetector        = new GestureDetector(view.Context, GestureListener);
     this.ZoomListener           = zoomListener;
     this.TapListener            = tapListener;
     this.LongPressListener      = longPressListener;
     this.DoubleTapListener      = doubleTapListener;
     GestureListener             = new GestureDetectorGestureListener(this);
     EndingZoomAction            = new ZoomAction(this);
 }
 public LongPressGestureRecognizerImageRenderer(Context context) : base(context)
 {
     _listener = new GestureDetector.SimpleOnGestureListener();
     _detector = new GestureDetector(_listener);
     _detector.IsLongpressEnabled = true;
 }