Questions tagged [long-press]

if the user keeps pressing the button for some time, a different action is executed from the short press action.

308 questions
8
votes
4 answers

UITableView need long press to select a row

Anyone has ever come into the problem that UITableView need long press to trigger the didSelectRowAtIndexPath method?
keywind
  • 1,135
  • 14
  • 24
7
votes
5 answers

Save image from WebView on long press

Need Help I'm trying to download pics from webview by long pressing photos, when I tested long press action with a toast message, it worked But it's not downloading. private View.OnLongClickListener listener=new View.OnLongClickListener() { …
Selva Kumaran
  • 81
  • 1
  • 3
7
votes
3 answers

Long Touch on a surfaceView ( android )

I'm making a game on Android and I need to do certain actions when the users attempts a long press on the screen. Unfortunately I haven't found any methods that works directly with a custom SurfaceView, feel free to tell me if such a method exists…
NioX5199
  • 1,772
  • 4
  • 13
  • 12
7
votes
1 answer

Registering UP/CANCEL from Dialog when DOWN event was triggered from a View's LongPress

I have a UX requirement that the user triggers a Dialog by long pressing a cell in a GridView. While the Dialog is displayed the user must be able to move their finger/thumb around the screen without triggering the UP/CANCEL event when they leave…
Bill Mote
  • 12,644
  • 7
  • 58
  • 82
7
votes
2 answers

Identify Cell after Tap Location in UICollectionView

I have attached a UILongPressGestureRecognizer to a Collection View with the aim of the user hold finger on a cell in the table and being asked if they want to remove it. The problem I have is that I can not get the indexPath like I would with a…
Recycled Steel
  • 2,272
  • 3
  • 30
  • 35
6
votes
2 answers

Combining jQuery Mobile taphold and jQuery UI draggable

I'm working on a mobile application where I'm trying to combine jQuery UI's draggable functionality with jQuery Mobile's taphold event. The idea is that an element becomes draggable when a taphold is executed. Draggable is being initialized on…
Thomas
  • 129
  • 1
  • 9
6
votes
2 answers

Adding long press gesture recognizer in Xamarin forms

Could you please let me know how can I recognize long press gesture in Xamarin Forms application? This is my xaml page which i created referring to this thread: Xamarin.forms.DataGrid
Mars
  • 269
  • 1
  • 3
  • 22
6
votes
2 answers

onTapUp isn't called after onLongPress

I'm trying to create a context menu that is displayed after a long press whilst keeping your finger held on the object, afterwards you would select an option (by dragging your finger) and lift it to initiate the action. I noticed something that to…
6
votes
1 answer

Swift: Pan & LongPress Recognizers Simultanously

I have defined longPress and Pan gesture recognizers at viewController class level as below: var touch = UILongPressGestureRecognizer() var pan = UIPanGestureRecognizer() Then I create a simple UIView: let qBox = UIView() qBox.frame = CGRect(x:…
Kashif
  • 4,642
  • 7
  • 44
  • 97
5
votes
1 answer

Implement Multi Select feature (Long press/Hold and select) in Ionic

I am working on an Ionic project having a list. I want a multi-select feature just like the hold and select feature in android gallery, so that upon long press checkboxes appear in front of list items, enabling me to select more than one item. Any…
5
votes
1 answer

Enabling 3D Touch Actions for Unsupported Devices with Long Press

I want to enable Peek&Pop, and include 3D Touch actions for iPhone 6s & up users, however I also want to enable a long press to enter non-3D Touch users into the Action sheet. I understand how to use the peek and pop delegate methods, and I…
Kenneth
  • 1,035
  • 1
  • 12
  • 26
5
votes
3 answers

iOS7 Sprite Kit how to get long press or other gestures on SKSpriteNode?

I'm building a sprite kit based game, and the lack of "right click" is really making it hard to convey some important information to my users. As a solution, I'm thinking about gestures like long press, two finger tap, etc. How can one implement…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
4
votes
1 answer

How to pause/disable UILongPressGestureRecognizer on a UITableViewCell while in editmode

In a tableview I have on every cell a UILongPressGestureRecognizer which I add like this: UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self …
BObereder
  • 1,046
  • 1
  • 13
  • 29
4
votes
1 answer

Long pressing an item on Android Chrome shows the context menu for a bit but then shows up an unwanted drag-and-drop item

For example, when I long press an item, it shows the context menu but then the context menu gets closed a tiny bit after and summons a drag-and-drop box (containing the URL and the name of the page if it's a link, if it's an image it then just shows…
Catomax26
  • 41
  • 1
  • 2
4
votes
4 answers

SwiftUI LongPressGesture takes too long to recognize when TapGesture also present

I would like to recognize a TapGesture and LongPressGesture on the same item. And it works fine, with the following exception: the LongPressGesture alone responds after the duration I specify, which is 0.25 seconds, but when I combine it with the…
Anton
  • 2,512
  • 2
  • 20
  • 36
1
2
3
20 21