Questions tagged [touch-event]

An event that is triggered when a user 'touches' a GUI component

A TouchEvent is an event that is triggered when a user 'touches' a GUI component. This is most commonly associated with applications that are designed to run on smart phones and touch screens. Many programming languages will treat an TouchEvent the same as a MouseEvent, which helps to provide touch functionality to applications that haven't specifically been designed for touch interactions.

1935 questions
10
votes
6 answers

WebView getting rid of double tap zoom.

I read many tickets on the topic of Zooming in WebViews and didnt came to an answer for my case. Here´s my setup: I´m using a custom webview with generally these settings:…
Ostkontentitan
  • 6,930
  • 5
  • 53
  • 71
10
votes
6 answers

Chrome "Emulate Touch Events" not working

I've enabled the "Emulate Touch Events" option in Chrome's Developer Tools. I set up a simple test program that alerts when I touch a
. The program works fine on my Galaxy Nexus, but when I click on the
in Chrome, even with the "Emulate…
Nathan Friend
  • 12,155
  • 10
  • 75
  • 125
9
votes
3 answers

Touch event handled by multiple views

I have a subclass of UIView on top of a UITableView. I am using the UITableView to display some data and, at the same time, I would like to overlay an animation that follows the finger (for instance, leaving a trail). If I get it right, I need the…
ios-lizard
  • 834
  • 1
  • 12
  • 19
9
votes
4 answers

Android MediaController intercepts all other touch events

The top half of my app has a VideoView with a MediaController under it. The bottom half is an image with some buttons. While the MediaController is visible, the buttons below are not clickable. It's like while the MediaController is visible, it…
Ronnie
  • 11,138
  • 21
  • 78
  • 140
9
votes
2 answers

Touch events on MKMapView's overlays

In the app I'm currently designing I have a MKMapView with overlays on it (customized MKPolylines btw) and I would like to be able to detect touch events on these overlays and assign a specific action to each overlay. Could any one help me on this…
Ben
  • 193
  • 2
  • 13
9
votes
2 answers

`@HostListener` of `e: TouchEvent` causes Firefox to crash with "ReferenceError: TouchEvent is not defined."

Using @HostListener with the event parameter explicitly typed as a TouchEvent, causes Firefox to crash with the following error message: ReferenceError: TouchEvent is not defined. An example: @HostListener('touchstart', ['$event']) // or…
pfeileon
  • 290
  • 1
  • 17
9
votes
2 answers

Pass Android NestedScrollView horizontal swipes to a parent View

I'm trying to make a left-right swipeable card system (like Tinder), where the card has a NestedScrollView on it. The goal would be that if the user swiped up and down only, the NestedScrollView would scroll, but if the user swiped left or right,…
9
votes
2 answers

Touch events within iFrame are not working on iOS

Touch events like touchstart or touchend are not fired when attached to the window inside an IFrame on iOS devices. Here's a very simple example: parent.html
suamikim
  • 5,350
  • 9
  • 40
  • 75
9
votes
1 answer

Calculate rotation velocity and naturally rotate view iOS

I have a circle-shaped view and have it rotate via the following code overriding touchesBegan(touches:, withEvent:) and touchesMoved(touches:, withEvent:). var deltaAngle = CGFloat(0) var startTransform: CGAffineTransform? override func…
Big_Mac
  • 2,975
  • 4
  • 20
  • 36
9
votes
2 answers

Handling Touch Events - onInterceptTouchEvent and onTouchEvent

I want to be able to swipe anywhere on the screen to call a certain function. But I also have Buttons in Linear Layouts that I want to be able to click on. If I swipe on a Button I want onInterceptTouchEvent to Intercept the call to the Button's…
user2456977
  • 3,830
  • 14
  • 48
  • 87
9
votes
3 answers

Adding TapGestureRecognizer to UILabel in Swift

I add a UITapGestureRecognizer:tapGesture, I want that when I click(touch) the label, klikPlay() will run its actions. when I run the code and click/touch the label, it gives this error: unrecognized selector sent to instance. It is about the…
DNC
  • 443
  • 1
  • 6
  • 20
9
votes
2 answers

Can use hammer.js pan events and still allow users to scroll?

I have a UI where users are scrolling a horizontally scrolling area. I still want them to be able to scroll left and right, but I'd like to fire an Hammer.js pan event at the same time. Here's my code at present: var worksHammertime = new…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
9
votes
1 answer

Should superview's gesture cancel subview's gesture in iOS 7?

For several years now I've operated under the assumption that if a superview and its subview both have gesture recognizers, the subview would receive the touches first and cancel out the superview's gesture. Until iOS 7 this assumption never failed…
Aaron Hayman
  • 8,492
  • 2
  • 36
  • 63
9
votes
3 answers

Android onTouchEvent Coordinates Skip around

I my app, I have an element that requires the user to move it around on the screen, and to do this I am using a RelativeLayout and on onTouchListener. The problem that I am having, is that inside of my onTouchListener, I am getting some weird…
Matt Clark
  • 27,671
  • 19
  • 68
  • 123
9
votes
4 answers

Cancel touchend if touchmove fires

I'm building something mainly for use on tablets, where the user can tap an item on the screen and a class is applied to it. This is what I have so far: The problems: I want to use touch events to remove the class and add the class on touch end (to…
mmm
  • 2,272
  • 3
  • 25
  • 41