Questions tagged [swipe]

A quick motion gesture across the touchscreen.

A quick motion gesture across a touchscreen.

2837 questions
44
votes
9 answers

ViewPager inside ViewPager

I would like to create a ViewPager (with three items) where each of its view is another ViewPager (with two items). User then swipe items like this: ViewPager1[0] ViewPager2[0] ViewPager1[0] ViewPager2[1] ViewPager1[1] ViewPager2[0] ViewPager1[1]…
44
votes
10 answers

Stop chrome back/forward two finger swipe

I want to disable the two finger swipe that causes Chrome going back or forward. I have a website where the user might lose progress on his work if he doesn't specifically saves. I have tried using window.onbeforeunload but that doesn't seem to work…
andrei
  • 8,252
  • 14
  • 51
  • 66
42
votes
3 answers

Disable gesture recognizer

I have two types of recognizer, one for tap and one for swipe UIGestureRecognizer *recognizer; //TAP recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(numTap1:)]; [(UITapGestureRecognizer *)recognizer…
Vins
  • 1,814
  • 4
  • 24
  • 40
42
votes
2 answers

Android "swipe" vs "fling"

In the Android Developers gesture design section, the term "swipe" is used. In the developer section, the term "fling" is used. Are these terms synonymous? From what I have found, I believe they are, but nowhere is it explicitly said one way or the…
Sean Beach
  • 2,050
  • 4
  • 26
  • 35
42
votes
11 answers

Swipe Back like Pinterest or Tumblr

Does anybody has an idea how Pinterest or Tumblr has implemented there "swipe back" method. i.e. on Pinterest you can click on a post on the news feed. Than the DetailActivity is started and displays the details for the selected post. Than you can…
sockeqwe
  • 15,574
  • 24
  • 88
  • 144
37
votes
4 answers

Method onTouchEvent not being called

I'm having a problem that my method @Override public boolean onTouchEvent(MotionEvent event) { return gestureDetector.onTouchEvent(event); } is never called. Any ideas why is that so? I'm building a google's API 4.0.3 application, and I'm…
gabrjan
  • 3,080
  • 9
  • 40
  • 69
35
votes
4 answers

How to disable ViewPager from swiping in one direction

I want to allow the user swipe in a ViewPager only from right to left. So once he passed a page he can't come back to it. How can this be done? I tried this solution: public class CustomViewPager extends ViewPager { float lastX = 0; boolean…
Emil Adz
  • 40,709
  • 36
  • 140
  • 187
33
votes
3 answers

How to detect Swipe Gesture in iOS?

In my iPhone app, I require to recognize the swipe gesture made by the user on the view. I want the swipe gestures to be recognized and perform a function on swipe. I need that the view should horizontally slide and show another view as a user makes…
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216
32
votes
4 answers

How to use Hammer to swipe

I've found an interesting resource: Hammer.js. I tried to swipe with Hammer and jQuery. 1) I've downloaded the code here 2) I've put that code in a document. I put a link to that code in the head of the document I want to use swipe:
Nrc
  • 9,577
  • 17
  • 67
  • 114
31
votes
5 answers

Detect left/right-swipe on touch-devices, but allow up/down-scrolling

I need to detect and react to left/right-swipes, but want to give the user the ability to scroll on the same element, so as long as he moves his finger only left/right with a maximum up/down movement of X pixels, it should not scroll, but when he…
Raphael Jeger
  • 5,024
  • 13
  • 48
  • 79
30
votes
1 answer

Android list view Right / Left swipes like call logs

I have an Android application in which there is List View Like this one Now I want to perform two different activities on right/Left swipe of the List Items in the same way How native call log works Right Swipe of list I want this type of…
Nikhil Agrawal
  • 26,128
  • 21
  • 90
  • 126
29
votes
7 answers

SwiftUI - Custom Swipe Actions In List

How can I use custom Swipe Actions in SwiftUI? I tried to use the UIKit Framework to get these working in SwiftUI. But that doesn't work for me. import SwiftUI import UIKit init() { override func tableView(_ tableView: UITableView,…
Max
  • 683
  • 2
  • 8
  • 12
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
28
votes
3 answers

Android - Gesture Detection (Swipe up/down) on particular view

I am trying to implement the OnGestureListener in Android. I have three TextViews in my layout. What i am trying to achieve is to set Gesture Listener for two of the textViews . Here is the layout -
Anukool
  • 5,301
  • 8
  • 29
  • 41
28
votes
3 answers

How can I implement a swiping/sliding animation between views?

I have a few views between which I want to swipe in an iOS program. Right now, I'm swiping between them using a modal style, with a cross dissolve animation. However, I want to have a swiping/sliding animation like you see on the home screen and…
user1368136
  • 281
  • 1
  • 4
  • 3