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
9
votes
3 answers

Detect if element has stopped momentum scrolling?

Is it possibile to detect if an element has stopped scrolling in Mobile Safari via Javascript? I have an element that has momentum scrolling by using -webkit-overflow-scrolling:touch, and I need to detect if the element has stopped scrolling,…
Charlie
  • 11,380
  • 19
  • 83
  • 138
8
votes
4 answers

touchend event in ios webkit not firing?

I'm trying to implement a menu for a ios webkit based app in which the user touches/clicks and holds a menu button ('.menu_item'), after 500ms the sub menu opens (div.slide_up_sub_menu), and a user should be able to slide their finger/mouse up to a…
Craig
  • 81
  • 1
  • 1
  • 2
8
votes
1 answer

disable long-press vibration in javascript for iOS

working on a webgame with ThreeJS. On iOS, a longpress creates a small haptic vibration feedback after 0.5s have passed. Since I'd like the user to be able to hold their finger down to walk around, this is a distraction. I've already got…
8
votes
4 answers

Android: can't seem to use MotionEvent.ACTION_MOVE correctly

I am quite new to Android programming and Java (though I have some experience with C#, so that helps). At this moment I'm goofing around with a couple of things to get to know how everything works. I've made an activity which implements…
Stijnn
  • 81
  • 1
  • 1
  • 4
8
votes
1 answer

Detecting taps on attributed text in a UITextView while the keyboard is showing

This is a supplemental question to a previous answer of mine to the question Detecting taps on attributed text in a UITextView in iOS. I retested the following code with Xcode 7.1.1 and iOS 9.1 and it works fine with the setup described in the…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
8
votes
1 answer

How to capture onTouch events on two overlapping views?

Layout !* Container is a relative layout contains two custom views: OuterView1 and InnerView2 * Outer View1 is a custom view, matching the parent’s size (full screen) * Inner View2 is also a custom view, laid on top of OuterView1 overlapping…
Rama Palaniappan
  • 365
  • 1
  • 3
  • 12
8
votes
2 answers

How can I avoid animation artifacts on my touch-draggable border-radius element on iPad?

I’ve written a little example page with elements that are draggable on touch devices (based on code by Peter-Paul Koch). My example page I have two draggable
elements: a green block, and a red ball (made ball-shaped with border-radius). The…
Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
8
votes
2 answers

Removing Fragment by clicking/touching outside:

I have some fragments that are added and removed from a RelativeLayout dynamically using code. one of the Fragments is a ListFragment, and as oppose to other my fragments that have a Close and Save Buttons this one contains only a list. My goal is…
Emil Adz
  • 40,709
  • 36
  • 140
  • 187
8
votes
2 answers

How to do something repeatedly while a button is pressed?

I'm developing a TV-Remote Simulator app in Android using a specific middleware (not of importance). In the case of Volume Buttons (Volume+ and Volume-), what I'm trying to do is to send the "Volume Up" signal repeatedly while its button is…
Truncarlos
  • 175
  • 2
  • 7
8
votes
6 answers

onTouch, onLongClick together in Android

I'm adding ImageViews to parent layout dynamically and performing zoom in/out operations with onTouch on the added image. I want to remove the added view with an onLongPress of…
SANDHYA
  • 771
  • 7
  • 18
  • 27
7
votes
2 answers

How to Highlight this pdf page using Ontouchevent in android

Here I want to highlight this text using onTouchevent in android
user1129139
7
votes
2 answers

Implement Drag & Drop in Gingerbread

I need to know how I can implement Drag & Drop in Android for the Gingerbread version. As I know Gingerbread doesn't support that by default. What I have coded: a ViewGroup class to hold dynamic added child, each child should after a long click be…
7
votes
2 answers

In Android 4.0 Navigation Bar hijack first touch event

In Android 4.0 on devices without hardware navigation keys, Android will render navigation bar. You can hide it, if you want by using setSystemUiVisibility(). If that is done, lets say if you want to get as much screen as possible for playback, when…
Perun
  • 141
  • 1
  • 5
7
votes
2 answers

iOS Touches (Auto) Offset on iPad

There is almost no information out there about this, so here is my problem: I'm working on a 2 player 'sit across from eachother' ipad game and the player who is on the opposite side has a hard time tapping buttons... because it appears that Apple…
cclogg
  • 709
  • 2
  • 7
  • 11
7
votes
1 answer

Touch move fire only once when implementing "less" like scrolling on mobile

I'm trying to to implement touch scroll in less extension to jQuery Terminal. It work similar to less unix command. I have this code: self.touch_scroll(function(event) { // how much difference changed since last touch move var delta =…
jcubic
  • 61,973
  • 54
  • 229
  • 402