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
7
votes
2 answers

onTouchEvent is getting executed when page is swiped using ViewPager and PassByValue

In my project have used onTouchEvent for detecting touch on the screen and doing action accordingly , and have used viewPager for swipe action. Problem is on swipe the touch actions are getting executed. so find the solution from here solved it.…
Zombie
  • 1,965
  • 2
  • 20
  • 34
7
votes
1 answer

Handling iPad touch events for draggables/droppables (undefined changedTouches)

I am trying to get jQuery drag/drop to work nicely with iPad touch events. I found this code on the internet: function touchHandler(event) { var touches = event.changedTouches, first = touches[0], type = ""; switch…
Davis Dimitriov
  • 4,159
  • 3
  • 31
  • 45
6
votes
1 answer

Android ACTION_UP even never called

I'm trying to make a small android Jump and Run game but my problem is that i can't configure the event ACTION_UP right. Here my Code: public boolean onTouchEvent(MotionEvent event) { switch(event.getAction()){ case…
M364M4N cro
  • 680
  • 2
  • 10
  • 23
6
votes
1 answer

Detect user touches on MKMapView in iOS 5

I have a MKMapView in a ViewController and would like to detect users' gestures when he/she touches the map with these methods: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesMoved:(NSSet *)touches…
6
votes
2 answers

android drawing on touch event

I'm trying to make an application which enables user to touch the screen and draw image based on users' finger coordinates. Here's my code : public class DrawingBoard extends View { Drawable editIcon =…
Jason
  • 125
  • 1
  • 5
  • 9
6
votes
4 answers

How to track every reasonable click in android app?

I need to track an event each time user clicks on any clickable view in my app. I want to do this generally so e.g. in my main activity. I know I can override onUserInteraction() or dispatchTouchEvent() but these are running even for the clicks…
Smeagol
  • 593
  • 9
  • 23
6
votes
3 answers

Disable user interaction while loading in swift

I'm making an API call in my ViewController willAppear method and till the API response completes I'm using this showWait and hideWait method to show and dismiss the activity indicator. But the problem I have is, in my ViewController I have a table…
Francis F
  • 3,157
  • 3
  • 41
  • 79
6
votes
4 answers

Pass Touch Events through Overlay

Setup I have 2 screens, let us call them A and B. Screen A is showing the camera image recorded by the back camera of the phone (third party library which i do not have further access to). Screen B has a semi transparent background and some UI…
6
votes
3 answers

Using touchstart and/or click (mousedown) Angular 6

Issue: I have a problem where in the whole application where click event is used. The app will be used on both mobile and web. I am using Angular 6. Every time you click on a button or link on the browser on my desktop it works on first click, but…
Seth
  • 61
  • 1
  • 1
  • 2
6
votes
1 answer

From an imageview touch point can you resize a MAT to get that points color?

In landscape orientation, I using myImageView.setImageBitmap(myBitmap) and using an ontouch listener to getX and getY and adjust for location of myImageView (same as getRawX and getRawY). I then use bitmapToMat to build a MAT to process the image…
BrianMiz
  • 1,101
  • 1
  • 10
  • 15
6
votes
2 answers

Misplaced clickable area due to class toggle / height change on touch event

There's a strange behavior on touch devices regarding the clickable area of a link, if you toggle the height of an element placed above. If you run the following snippet (e.g. save it locally and use chrome to emulate touch events), you will notice…
chaenu
  • 1,915
  • 16
  • 32
6
votes
1 answer

Pass touch event from NestedScrollView to parent view's

I have a ViewPager below a NestedScrollView width some top padding, and clipToPadding(false) and transparent background (like as image). My ViewPager can't get touch event and doesn't work. How can I solve this problem? (I can't change my structure…
6
votes
3 answers

Touch Events Broken with ReactJS Upgrade in Chrome Mobile Emulator

I recently upgraded from React 0.10 to React 0.14. Initially I was getting an error that React.initializeTouchEvents was not a function. I read some documentation which claimed that the need for this initialization was gone in the most recent…
kat
  • 5,645
  • 4
  • 19
  • 35
6
votes
2 answers

Increase touch slop in Android button

We have an Android app that is meant to be mounted on the dash of a vehicle that is operating in rough terrain, so everything is really shaky. We've found that making a single tap on the screen in this kind of situation is difficult, as the taps are…
Mick Byrne
  • 14,394
  • 16
  • 76
  • 91
6
votes
1 answer

Select multiple item by drag block them

First, let me tell u that i am stressed out by this, because i don't even know the concept / method name, so i can't even search it in google as i don't know the keywords, but ill try my best to explain it. Feel free to modify my contents and title…
DeckyFx
  • 1,308
  • 3
  • 11
  • 32