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

Is there a way to touch-enable scrolling in a WPF ScrollViewer?

I'm trying to create a form in a WPF application that will allow the user to use iPhone-like gestures to scroll through the available fields. So, I've put all my form controls inside a StackPanel inside a ScrollViewer, and the scrollbar shows up as…
Brian Sullivan
  • 27,513
  • 23
  • 77
  • 91
50
votes
17 answers

How to cancel an Dialog themed like Activity when touched outside the window?

I have an activity with a Dialog theme and I would like to close (finish) this activity when someone touches the screen anywhere outside this activity's window ? How can I do this ?
Alex
  • 2,213
  • 4
  • 32
  • 44
50
votes
3 answers

event.originalEvent jQuery

I am currently immersed in the jQuery learning center. I'm going from start to end. I just read this paragraph: It's also important to note that the event object contains a property called originalEvent, which is the event object that the…
BryanK
  • 1,211
  • 4
  • 15
  • 33
49
votes
12 answers

prevent touchstart when swiping

I have a scrollable list on a mobile device. They want people to be able to scroll the list via swiping, and also select a row by tapping. The catch is combining the two. I don't want a row to be selected if you are actually scrolling the list.…
DA.
  • 39,848
  • 49
  • 150
  • 213
49
votes
2 answers

How can I implement a touch-sensitive, responsive, sortable list supporting drag & drop for Bootstrap?

I have a
    list that I want to make sortable (drag & drop). How can I get it to work with Bootstrap 3 in modern browsers and touch devices? I'm trying to use jqueryui-sortable combined with http://touchpunch.furf.com/; it seems to work, but it's…
brk
  • 631
  • 1
  • 6
  • 4
49
votes
2 answers

In Android, what is the difference between getAction() and getActionMasked() in MotionEvent?

I am confused by the two methods in Android. It seems that both methods tell you what kind of event it is, i.e., whether it is a down or up event. When will I use which? public void onTouchEvent(MotionEvent e) Don't quote the documentation please,…
user1233587
  • 2,033
  • 4
  • 24
  • 24
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
3 answers

Is it possible to add an eventlistener on a DIV?

I know this function: document.addEventListener('touchstart', function(event) { alert(event.touches.length); }, false); But is it possible to add this to a div? Example: document.getElementById("div").addEventListener('touchstart',…
Roskvist
  • 1,030
  • 3
  • 14
  • 24
46
votes
8 answers

UIPicker detect tap on currently selected row

I have a UIPickerView and The method didSelectRow is not called when tapping on a selected row. I need to handle this case. Any ideas?
Royce
  • 461
  • 1
  • 4
  • 3
45
votes
6 answers

How to capture touchend coordinates?

I am trying to capture touch coordinate on the touchend event but get undefined. The touchstart event works good, but same concept fails on touchend. I built this code with mousedown and mouseup and that works good. What am I…
Rikard
  • 7,485
  • 11
  • 55
  • 92
44
votes
5 answers

Determine vertical direction of a touchmove

i'm trying to implement a touch listener for tablets to trigger some actions depending whether it touchmoved upwards or downwards. I tried the native listener: ($document).bind('touchmove', function (e) { alert("it worked but i don't know the…
madprops
  • 3,909
  • 5
  • 34
  • 42
43
votes
5 answers

Automatically pop up tablet touch keyboard on WinForms input focus

When I run a WinForms (or Delphi, see at the end) application on Windows 10 in a tablet mode, a touch keyboard does not pop up automatically, when an input box is focused. I believe that this should happen automatically, without any additional…
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
42
votes
4 answers

How to get touches when parent view has userInteractionEnabled set to NO in iOS

When the parent view has userInteractionEnabled=NO, its subviews will not accept touch events even if their userInteractionEnabled property is set to YES. Is there any way to still get touch events in subviews?
subchap
  • 847
  • 2
  • 10
  • 15
42
votes
5 answers

Preferred Alternative to OnMouseOver for touch

Is there a preferred alternative or best practice for handling OnMouseOver javascript events on touch devices? All I can think is to convert all events to OnMouseClick. Unfortunately this muddles the differences between events triggered by…
Daniel Nill
  • 5,539
  • 10
  • 45
  • 63
42
votes
12 answers

Why/when do I have to tap twice to trigger click on iOS

Ok I feel like I'm crazy... I'm looking at Mobile Safari on iOs 6.0. I can't seem to establish any rhyme or reason as to when tapping on an element will trigger click. In many cases, it seems I need to tap once to trigger a hover and then again to…
user2383672
  • 449
  • 1
  • 5
  • 6