Questions tagged [gesture]

A gesture is a specific pattern of touch, cursor, or physical movement that may be recognized by an application to perform a specific task.

A gesture is a specific pattern of touch, cursor, or physical movement (Recognized through a camera or other sensor such as or ) that may be recognized by an application to perform a specific task. See also .

2187 questions
30
votes
10 answers

How do you detect a SwiftUI touchDown event with no movement or duration?

I'm trying to detect when a finger first makes contact with a view in SwiftUI. I could do this very easily with UIKit Events but can't figure this out in SwiftUI. I've tried a DragGesture with minimum movement of 0 but it still won't change until…
eli_slade
  • 419
  • 1
  • 4
  • 12
29
votes
3 answers

Touchscreen gestures list and names

Where can I find a list of all (many) touchscreen gestures including complex 4 and 5 finger ones for iPad, with a reasonable technical implementation guidelines and code (C++/Java) examples?
Sergey K.
  • 24,894
  • 13
  • 106
  • 174
28
votes
4 answers

How to recognize swipe gesture in UIScrollView

I'm trying to recognize left/right swipe gesture in a UIScrollView. I've tried to create UISwipeGestureRecognizers and associate them with the scroll view. It works but very rarely. Most of the time I do not get called. Why? How can I reliably get…
David
  • 2,770
  • 5
  • 35
  • 43
26
votes
2 answers

How can I create a drag and drop action in React native?

Say I have two Views, A and B. I want to have the ability to trigger a 'dragAndDropStart' event on touching View A and then enable a drag and drop from A to B... displaying feedback to the user throughout (i.e. showing a line appearing between View…
Pete Thorne
  • 2,656
  • 4
  • 21
  • 29
26
votes
3 answers

Animate the keyboard in sync with the UIView while edge-swiping back in iOS7

I'd like to get the behavior similar to Messages app (also common in most texting apps) in iOS7, where in a conversation view swiping right from the left edge of the screen would behave like the back button in a UINavigationController. I have…
Mehrdad Afshari
  • 414,610
  • 91
  • 852
  • 789
25
votes
4 answers

Problems with gesture recognizer in iOS 7

I'm adding several UIView objects (e.g. 5) to the screen, one inside the other. This, for example, view5.superview = view4, view4.superview = view3, view3.superview=view2, view2.superview = view1. For all these UIView I set uitapgesturerecognizer;…
Kup
  • 301
  • 1
  • 3
  • 9
24
votes
6 answers

Flutter Zoomable Widget

What I want to build is a widget that can make its child widget zoomable similar to the zoomable behavior. Gestures I want to cover are Pinch To Zoom Double Tap to Zoom Tap to get the local Position of the widget Here is my widget…
Aawaz Gyawali
  • 3,244
  • 5
  • 28
  • 48
24
votes
1 answer

CustomDrawerLayout from four screen sides issue with Fling gesture and detection

I am trying to create and improve existing SlidingDrawers projects that can work for all four sides of the screen {LEFT, RIGHT, TOP, BOTTOM}. There are a few libraries, however, they all have limitations, complications and bugs. One of the more…
portfoliobuilder
  • 7,556
  • 14
  • 76
  • 136
24
votes
3 answers

RecyclerView ItemTouchHelper Action Drag Ended

I need to listen to the user when he stops drag and drop on my RecyclerView (when he drops the selected item). Can I get this Information through my ItemTouchHelper? Thanks for helping Mark: At the moment i only now when the user still moves the…
Sebastian
  • 408
  • 1
  • 6
  • 11
23
votes
4 answers

Get swipe direction in Cocoa Touch

I am trying to catch a gesture but it does not work. Here is my code: UISwipeGestureRecognizer *recognizer; recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)]; [recognizer…
Csabi
  • 3,097
  • 17
  • 59
  • 107
22
votes
8 answers

How do I detect if a GestureDetector is hovered in Flutter?

So I have a widget GestureDetector in Flutter and I want it to do something on "hover", like this (dragged in any direction): Is it possible to do it with GestureDetector? Any help appreciated.
Yanb
  • 638
  • 1
  • 3
  • 20
22
votes
4 answers

Flutter GestureDetector: How to pinch in/out or zoom in/out Text using two fingers?

I'm creating a text field like Text or RichText. And after that, I want to zoom in/out the size of text using pinching. For now, I tried implementing GestureDetector but it zooms in/out with one finger too. And it is really hard to aim pinching…
mkubasz
  • 495
  • 2
  • 7
  • 16
22
votes
3 answers

Long press in GestureDetector also fires on tap

I tried implementing code from this question: Detecting a long press with Android, but it always detects a long press, if even I just tap it. My code is as follows (I extended ImageView, because more code is in it, not relevant for this…
Bart Friederichs
  • 33,050
  • 15
  • 95
  • 195
21
votes
3 answers

react-native swipeable gesture not working on android?

I am doing a react native course with Mosh (https://codewithmosh.com/). I am using expo. I am very new to react native and don't really know what I am doing, but I know my code should work. I double-checked my code against his and even went so far…
Kris_Stoltz
  • 928
  • 4
  • 11
21
votes
6 answers

Swipe detection for each row of listview

I have a list of videos located in the sd-card. At this point, I just need help in creating gestures or swipe detection for each row in the list view. Thanks to this question at stackoverflow Fling gesture detection on grid layout, I implemented the…
Farhan Khurshid
  • 211
  • 1
  • 2
  • 3