if the user keeps pressing the button for some time, a different action is executed from the short press action.
Questions tagged [long-press]
308 questions
4
votes
2 answers
UILongPressGestureRecognizer in IOS 13 second long press two times on MKMapView not work
I have set up a UILongPressGestureRecognizer that works fine in versions before IOS 13, but in this version to detect the second long press, I have to press twice.
That is to say:
1º LongPress -> Work Fine show "long tap"
2º LongPress -> Not work
3º…

ja12
- 351
- 2
- 16
4
votes
2 answers
Button with double action (tap & long press) in SwiftUI
Is it possible in SwiftUI to set a button with an action on tap and a different action on long press ?
I have tried this:
Button(action: {
self.handleButtonTap()
})
{
Text("My nice button")
…

Michel
- 10,303
- 17
- 82
- 179
4
votes
1 answer
long press quick setting tile in android
I am new to android development. Trying to make a tile service, but I have trouble to overriding the default long press action.
For that, I have a class called QSTileService which extends TileService, and I want my tile to do different things…

mk360
- 51
- 2
- 3
4
votes
4 answers
android: How to increase long press time for listview items in android?
I have a custom listview, in which items are scroll horizontal. I want to perform single touch and longpress for items for 5 sec for listview items. How to do this. How can i increase longpress time interval for listview items to 5 sec.

Manish Kumar
- 71
- 1
- 6
4
votes
0 answers
Android ItemTouchHelper.Callback Shorten Long Press Duration
I want to know if there is a way to shorten the long press during.
To be more specific, I am working on a Drag-and-Drop thing in recyclerview.
@Override
public boolean isLongPressDragEnabled() {
return true;
}
By overriding the above method in…

moutaigua8183
- 56
- 5
4
votes
3 answers
Android - long pressing to open the context menu on a TextView also triggers an autoLink click
I have a TextView that launches a context menu:
textView.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {
@Override
public void onCreateContextMenu(ContextMenu contextMenu,
…

allenc
- 59
- 5
4
votes
3 answers
Disable copy and paste menu from the textfield on a WebView. My app is based on IOS Phonegap.
My app is a ios phonegap application . I want to disable the copy and paste menu from the textfields on the web view. On long press and on double clicks , the copy paste menu shows up.I tried to disable long press and double clicks with…

user2903299
- 101
- 2
- 9
3
votes
0 answers
UILongPressGestureRecognizer does not detect back-to-back long presses
I have created a simple Swift application to test out the UILongPressGestureRecognizer. The app shows the world map (MKMapView) onto the screen where the user can long press on the map and I simply print out the number of times the user has long…

atrdeveloper
- 137
- 8
3
votes
0 answers
Ionic React: How to make a long press gesture for an image in Ionic React?
I am new to Ionic React and I am looking to make a long press event for an image. It seems that they removed the function from react from this version because of some errors. Is there a way to make it manually?
Thanks

Jared Luu
- 91
- 1
- 1
- 3
3
votes
2 answers
Swift 5 CollectionView get indexPath by longPress cell
I am looking way to get indexPath or data when i do longPress on cell. Basically i can to delete album from collectionView, to do that i need to get id.
My cellForItem
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath:…

George Heints
- 1,303
- 3
- 20
- 37
3
votes
0 answers
How to use both TapGestureRecognizers and Effects in Xamarin Forms at the same control at same time?
I need to use TapGestureRecognizer and Long Press effect at Grid at the same time. I need to implement two different functionality one is at long press and one is at tapgesture. I implemented the tapgesture and longpress on grid and its working fine…

anand
- 1,399
- 5
- 23
- 55
3
votes
1 answer
Long Press Gesture called multiple times
I am getting an issue with UILongPressGestureRecognizer, I have used this code:-
func addLongPressGesture(){
let lngPr = UILongPressGestureRecognizer.init(target: self, action: #selector(self.handleLongPress(gesture:)))
…
user7433826
3
votes
1 answer
Flutter longPress event functionality for selection of row(s) and/or elements
I need to implement a long press selection on a row element of Flutter for Android and iOS. Any help please?
My code so far:
class ListElement extends StatelessWidget {
ListElement({this.text, this.name, this.mId, this.animationController});
…

Ore0D3v
- 159
- 1
- 2
- 11
3
votes
1 answer
iOS TableView Long press Gesture going to didselectrowatIndexpath
Guys, I have table view which displays images so for any image tap opens the image in
didselectrowatIndexpath
So I wanted to add a long press gesture so I added
let longPressGesture = UILongPressGestureRecognizer(target: self, action:…

Santhosh S Kashyap
- 973
- 2
- 13
- 19
3
votes
1 answer
Call scroll event after calling Longpress using GestureDetector
How should I call a scroll event after calling Longpress without release a screen (using gesturedetector)?
Here is my class:
public class TestingGestureDetector extends AppCompatActivity implements GestureDetector.OnGestureListener {
TextView…

android developer
- 31
- 1