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
0
votes
1 answer

IOS disable the touch area on top of Tab bar

The red color area is the area that is always "on top", thus it gets all my touches on the screen. I found that tab bar has such an area that's always on top, and so that blocks all my touch events. Even if I programmatically add a UI button on top…
yaukit2000
  • 11
  • 1
  • 4
0
votes
1 answer

Android opengl moving an object Ontouch

firstly I'm really new to opengl on androidand I'm still looking though courses online I'm trying to make a simply appthat has a sequre in the middle of the screen and on touch it's moves to the touch event coordinate this is my sureface view public…
Mark
  • 47
  • 2
  • 13
0
votes
1 answer

Android webView touchEvents

I have a webapp I am trying to interface with android. It is very easy to get a webview to display the page, however the page uses an on screen keyboard. If only one input was on a page, it would be easy to…
0
votes
0 answers

Gesture Detection in Android Fragments

My Gesture Detector Code: It's all Simple pre-defined code private final GestureDetector.SimpleOnGestureListener mGestureListener = new GestureDetector.SimpleOnGestureListener() { @Override public boolean onDown(MotionEvent e)…
phoenisx
  • 1,507
  • 17
  • 28
0
votes
1 answer

Cancel current touch events until next touchstart

I have to simulate longpress using javascript. var timer; $(element).on('touchend',function(e){ clearTimeout(timer); }); $(element).on('touchstart',function(e){ timer=setTimeout(function() { //some action },1000); …
rishabh dev
  • 1,711
  • 1
  • 15
  • 26
0
votes
2 answers

Draw a circle in Android Canvas when previous circle was selected at predefined positions

This is my first time using Canvas in Android. I am creating an app that would display circles at certain positions on the screen one at a time (positions are selected randomly). New circle should be drawn after the previous one was…
0
votes
1 answer

Problems with Bitmap following my finger

I am trying to make a bitmap, stored in the class Player, follow my finger around without giving it the ability to "teleport". I first tried this block of code: @Override public boolean onTouchEvent(MotionEvent event) { pointerX =…
0
votes
1 answer

How do I make an image(drawable) follow my finger?

I have this class which extends SurfaceView. The code that I have so far makes the player follow my finger, but it also allows the player to "teleport" to wherever the finger goes and I do not want that. @Override public boolean…
0
votes
1 answer

Detect Collision of rectangle and hide one of them

I am trying to develop a simple 2D game. In which I have rectangles with multiple timers. I wanted to detect a collision of the rectangle in my custom view. I have used multiple timers for both rectangles. I want one of the rectangle to disappear…
Palash Dange
  • 127
  • 2
  • 10
0
votes
1 answer

Android: Tag child element of a view on touch_down event

I have this architecture (ViewGroup with a View and RecyclerView):
Schadenfreude
  • 1,522
  • 1
  • 20
  • 41
0
votes
1 answer

New image on user touch

Hi I am a newbie in android. My question is is there any function to display an image from drawable into screen. By the way I am able to move the same image on the co-ordinates I touch, I just need the new image to be placed on the co-ordinate i…
0
votes
0 answers

Simultaneously changing View's position and maintaining the bottom edge at a fixed location

Problem So lets say I have a ViewPager (or any other view, but lets consider ViewPager) which is contained in a RelativeLayout with AlightParent top, bottom, right and left as TRUE. like:
0
votes
2 answers

Wrong coordinates on multi touch with onTouchEvent android

I have an issue with the input in my game. In my game, there is a joystick and two buttons. I've overwritten the onTouchEvent method for input. The onTouchEvent changes a few variables which another method in the class processes. @Override public…
0
votes
0 answers

Mobile Browsers - Tap event/psuedo event for navigating a site

I am looking to try and make my current mobile site have the look and feel of a native app for iOS, Android and Windows Phone by giving the user some feedback when they click a link. What I am looking to do is when a user clicks a link it changes…
ChronixPsyc
  • 478
  • 1
  • 8
  • 22
0
votes
1 answer

How to disable onTouchEvent

in my code, I make the ball fall well, but if I touch the screen 2 times the animation appear 2 times and if I touch 6 times the animation appear 6 times. How I can stop the next animation when the last one is running ? This is my code: public…
user5085379