Questions tagged [swipe]

A quick motion gesture across the touchscreen.

A quick motion gesture across a touchscreen.

2837 questions
497
votes
22 answers

Android: How to handle right to left swipe gestures

I want my app to recognize when a user swipes from right to left on the phone screen. How to do this?
endryha
  • 7,166
  • 8
  • 40
  • 64
424
votes
28 answers

Detect a finger swipe through JavaScript on the iPhone and Android

How can you detect that a user swiped his finger in some direction over a web page with JavaScript? I was wondering if there was one solution that would work for websites on both the iPhone and an Android phone.
827
  • 4,864
  • 4
  • 19
  • 24
166
votes
8 answers

dynamically add and remove view to viewpager

(I figured out a solution - please see my post in the Answer section below.) In my app, the user will start with a single view of his data. I'd like to add a ViewPager and allow the user to add more views as desired. How do I do this? (I dont'…
Peri Hartman
  • 19,314
  • 18
  • 55
  • 101
143
votes
20 answers

How to recognize swipe in all 4 directions

I need to use swipe to recognize swipe gesture down and then right. But on swift UISwipeGestureRecognizer has predeterminate Right direction.. And I don't know how make this for use other directions..
user3739367
  • 4,161
  • 6
  • 20
  • 18
131
votes
12 answers

Setting direction for UISwipeGestureRecognizer

I want to add simple swipe gesture recognition to my view based iPhone project. Gestures in all directions (right, down, left, up) should be recognized. It is stated in the docs for UISwipeGestureRecognizer: You may specify multiple directions by…
sandisn
  • 1,313
  • 2
  • 9
  • 5
91
votes
3 answers

catch on swipe to dismiss event

I'm using an android notification to alert the user once a service is finished (success or failure), and I want to delete local files once the process is done. My problem is that in the event of failure - I want to let the user a "retry" option. and…
Dror Fichman
  • 1,559
  • 1
  • 14
  • 16
81
votes
13 answers

Custom edit view in UITableViewCell while swipe left. Objective-C or Swift

How to make a custom edit view in iOS7 UITableView with Objective C like the Evernote or the Apple Reminders app while swipe left. I have tried to set an custom editingAccessoryView, but this didn't work. Evernote edit view: Reminders edit view:…
ugoarangino
  • 827
  • 1
  • 7
  • 5
79
votes
12 answers

Android RecyclerView ItemTouchHelper revert swipe and restore view holder

Is there a way to revert a swipe action and restore the view holder to its initial position after the swipe is completed and onSwiped is called on the ItemTouchHelper.Callback instance? I got the RecyclerView, ItemTouchHelper and…
kukabi
  • 1,273
  • 1
  • 9
  • 14
79
votes
9 answers

PagerAdapter start position

I'm using the following example to impliment my viewPager: http://code.google.com/p/viewpagerexample/issues/list The problem with this example is that I can't figure out how to set my starting position, the default starting position is 0. Basically…
Kirill Kulakov
  • 10,035
  • 9
  • 50
  • 67
69
votes
5 answers

Set default page for ViewPager in Android

I am using the following code, MAX is 2 pages. By default the position is 0 and adds a new page to the right. I inflate two layout files. How can I show the page1 when the app starts and add a new page to the left ? Thanks. main.xml
dcanh121
  • 4,665
  • 11
  • 37
  • 84
67
votes
13 answers

How to detect swipe in flutter

I've tried using the swipe detector plugin for flutter to achieve navigating to a new screen on swipe right but it's not working, no errors are thrown and the breakpoint is never hit when I debug it. I looked into the GestureDector but I wasn't sure…
Sam Cromer
  • 2,063
  • 10
  • 28
  • 50
63
votes
5 answers

React Navigation: Swipe on drawer does not work in Android

I have been searching for a solution for a long time, but surprisingly, I think nobody has faced it yet. So I am posting it. I have created a simple Drawer Navigator with React Navigation V3. I have added a Menu icon, and when I click it, the drawer…
Sadman Muhib Samyo
  • 2,438
  • 2
  • 10
  • 16
55
votes
9 answers

How to detect Swiping UP, DOWN, LEFT and RIGHT with SwiftUI on a View

I'm getting into building Apple Watch apps. What I'm currently working on will require me to make use of detecting swipes in the four main directions (UP, DOWN, LEFT and RIGHT) The problem is I have no idea how to detect this. I've been looking…
Barry Michael Doyle
  • 9,333
  • 30
  • 83
  • 143
49
votes
8 answers

How to implement swipe gestures for mobile devices?

I have an application made in AngularJS which has arrow key navigation to switch views. I want to implement this navigation using swipe for touch devices. I tried jGestures library but it doesn't go well with swipe. I have been recommended NOT to…
fotuzlab
  • 1,436
  • 1
  • 15
  • 19
48
votes
4 answers

Android Swipe on List

Does anyone have a simple example of a ListActivity displaying Textviews in a column and when you swipe left to right you see that row in a new view? This would be to say edit the data for that row or show more detailed info on that row. Please do…
JPM
  • 9,077
  • 13
  • 78
  • 137
1
2 3
99 100