Questions tagged [touch]

Touch-based interfaces have unique considerations that do not apply to other modes of input, and vice versa.

Touch-based interfaces are found on devices such as tablet PCs and touch-screen smartphones. The touch interfaces common today use capacitive technology designed to work well with simple finger touches. (Older, pressure-sensitive displays require the use of a stylus for accurate input.)

While touch input is similar to other two-dimensional input methods such as mice and drawing tablets, it lacks some characteristics of those other devices that are often taken for granted. For example, an on-screen cursor can be moved with a mouse to "hover" over an object without selecting it; there is no analogue to this in a touch interface because the act of pointing and selecting are both defined by a single touch.

Conversely, it is possible to do some kinds of input via touch that are difficult or impossible to represent with something like a mouse. In particular, modern "multitouch" interfaces allow two fingers to be used for pinching or stretching. Also, two or more fingers may be used to augment normal touching and dragging gestures (though this is analogous to using a mouse with alternate buttons or keyboard modifiers).

6318 questions
126
votes
5 answers

Javascript Drag and drop for touch devices

I am looking for a drag & DROP plugin that works on touch devices. I would like similar functionality to the jQuery UI plugin which allows "droppable" elements. The jqtouch plugin supports dragging, but no dropping. Here is drag & drop that only…
joe
  • 16,988
  • 36
  • 94
  • 131
126
votes
5 answers

jquery-ui sortable | How to get it work on iPad/touchdevices?

How do I get the jQuery-UI sortable feature working on iPad and other touch devices? http://jqueryui.com/demos/sortable/ I tried to using event.preventDefault();, event.cancelBubble=true;, and event.stopPropagation(); with the touchmove and the…
eventhorizon
  • 3,579
  • 3
  • 17
  • 9
124
votes
6 answers

Draw in Canvas by finger, Android

I need to build a project for drawing on canvas by fingers. How to get the touch event and motion event of my finger and then draw?
Sameer H. Ibra
  • 1,816
  • 2
  • 17
  • 25
122
votes
21 answers

Disable hover effects on mobile browsers

I'm writing a Web site that's meant to be used from both desktops and tablets. When it's being visited from a desktop, I want the clickable areas of the screen to light up with :hover effects (different background color, etc.) With a tablet, there's…
Joe White
  • 94,807
  • 60
  • 220
  • 330
118
votes
10 answers

Disable scrolling when touch moving certain element

I have a page with a section to sketch a drawing in. But the touchmove events, at least the vertical ones, are also scrolling the page (which degrades the sketching experience) when using it on a mobile browser. Is there a way to either a) disable…
Scott Hunter
  • 48,888
  • 12
  • 60
  • 101
118
votes
3 answers

jQuery UI slider Touch & Drag/Drop support on Mobile devices

I have already styled and implemented jQuery UI slider into a project. Though it's responsive, the slider does not respond to being touched and dragged. Instead, you have to touch where you want the slider to go. I'd like to avoid swapping to jQuery…
Seth
  • 10,198
  • 10
  • 45
  • 68
115
votes
5 answers

Is there an equivalent to e.PageX position for 'touchstart' event as there is for click event?

I'm trying to get the X position with jQuery of a touchstart event, used with the live function? I.e. $('#box').live('touchstart', function(e) { var xPos = e.PageX; } ); Now, this does work with 'click' as the event. How on earth (without using the…
waxical
  • 3,826
  • 8
  • 45
  • 69
113
votes
6 answers

What is meaning of boolean value returned from an event-handling method in Android

In android, most event listener methods return a boolean value. What is that true/false value mean ? what will it result in to the subsequence events ? class MyTouchListener implements OnTouchListener { @Override public boolean onTouch(View…
John Wang
  • 4,562
  • 9
  • 37
  • 54
96
votes
4 answers

jQuery UI sliders on touch devices

I'm developing a website using jQuery UI, and there are several elements on my site that appear to be incompatible when viewed on touchscreen devices; they don't cause any errors, but the behavior is not what it should be. The elements in question…
jqcoder
  • 961
  • 1
  • 7
  • 5
95
votes
10 answers

Eliminate 300ms delay on click events in mobile Safari

I've read that mobile Safari has a 300ms delay on click events from the time the link/button is clicked to the time the event fires. The reason for the delay is to wait to see if the user intends to double-click, but from a UX perspective waiting…
tim peterson
  • 23,653
  • 59
  • 177
  • 299
93
votes
8 answers

Basic Drag and Drop in iOS

I want to have a view in which there are vehicles driving around that the user can also drag and drop. What do you think is the best large-scale strategy for doing this? Is it best to get touch events from the views representing the vehicles, or…
Luke
  • 7,110
  • 6
  • 45
  • 74
81
votes
4 answers

Understanding touch events

I'm trying to make some of my libraries work with touch devices, but I'm having a hard time trying to figure out how they're supported and how they work. Basically, there are 5 touch events, but it seems there's consensus among mobile browsers only…
MaxArt
  • 22,200
  • 10
  • 82
  • 81
75
votes
11 answers

Google Maps Android API v2 - detect touch on map

I can't find an example on how to intercept the map touch on the new Google Maps API v2. I need to know when the user touches the map in order to stop a thread (the centering of the map around my current location).
Gaucho
  • 1,328
  • 1
  • 17
  • 32
72
votes
11 answers

Android How to draw a smooth line following your finger

http://marakana.com/tutorials/android/2d-graphics-example.html I am using this example below. But when I move my fingers too fast across the screen the line turns to individual dots. I am not sure whether I can speed up the drawing. Or I should…
Somk
  • 11,869
  • 32
  • 97
  • 143
72
votes
5 answers

Simulating touch events on a PC browser

I am developing an HTML application for the iPad. As such it utilizes touch events and webkit-CSS animations. Up until now I have used chrome as my debugging environment because of it's awesome developer mode. What I would like is to be able to…
eshalev
  • 3,033
  • 4
  • 34
  • 48