A package in the Android SDK that provides classes to create, recognize, load and save gestures. Gestures are patterns on the touch screen that map to specific functions.
Questions tagged [android-gesture]
271 questions
5
votes
0 answers
How to detect edges swipe on android phone for manipulating touch behaviour?
I am implementing GestureDetector.OnGestureListener in Activity,
whose overridden onTouchEvent is :
public boolean onTouchEvent(MotionEvent event) {
//gestureDetector is new GestureDetector(this,this) in Activity's onCreate()
…

bharat
- 105
- 1
- 1
- 8
5
votes
3 answers
The meaning of returning false from OnGestureListener.onDown()
According to android training if you extend GestureDetector.SimpleOnGestureListener, and return false from onDown(...) than the other methods of GestureDetector.SimpleOnGestureListener will never get called:
Whether or not you use…

Presen
- 1,809
- 4
- 31
- 46
5
votes
4 answers
How can I implement a chrome like "auto-hide navigation" for my Android app?
In Chrome, the address bar will be hidden/shown when user swipes up/down the content.
Can I implement the similar logic to my app?

Dragon warrior
- 1,644
- 2
- 24
- 37
5
votes
3 answers
How to know if two images are intersect while one image moving in android?
In my application, i am moving image around the screen by using onTouchListener.
I have another two images in the same view.
My problem is that, when the moving image, touches any of the other images, i need to perform a certain action
(that means…

user2681425
- 215
- 1
- 4
- 7
5
votes
1 answer
Obtain view that is touched with GestureDetector
I have implemented GestureDetector in my Activity. Right now I can grab all events from whole screen like onSingleTapConfirmed, onDoubleTap, onLongPress...
Is it possible to detect, which View from my custom layout was pressed ?

hsz
- 148,279
- 62
- 259
- 315
5
votes
2 answers
Android libgdx swipe left and right detection using gesture listener
I have displayed a image at the center of the screen with libgdx. If i swipe left the image should move left and if i swipe right image should move right.
Subsequent swipes to the left should move the image left. The same should happen for right. …

Raghunandan
- 132,755
- 26
- 225
- 256
5
votes
3 answers
Path intersection in android
I have 2 path objects in my android code.I have tried all the way to check whether these paths are intersected or not, but not able to do it. How can I check whether the paths are intersected or not. Appreciate any good response,
Thanks !

V I J E S H
- 7,464
- 10
- 29
- 37
5
votes
1 answer
android: how to detect horizontal and vertical gesture lines
I have some objects which I want to connect with lines. The user should be able to do so with a simple line-gesture. I use a GestureOverlayView and read that article http://developer.android.com/resources/articles/gestures.html, which says the…

alchra
- 69
- 1
- 5
4
votes
2 answers
change gesture color at run time
I want to change gesture color at run time.
I am able to change gesture color using layout XML but not using code.
I have tried
private class GesturesProcessor implements GestureOverlayView.OnGestureListener {
public GesturesProcessor() {
…

varun
- 768
- 7
- 19
4
votes
0 answers
Android : Differentiate between a flick and swipe
I'm trying to do differentiate between swipe and a flick action. For flick I'm using onFling method of SimpleGestureControl and ACTION_MOVE to detect horizontal swipe. I'm able to achieve the almost desired result but when I do long flick(i.e.…

crysis
- 1,514
- 1
- 20
- 35
4
votes
0 answers
Android: How/where to put gesture code into IME?
I'm new to Android but I'm trying to create an IME that allows for gesture-character recognition. I can already do simple apps that perform gesture recognition but am not sure where to hook in the gesture views/obj with an IME. Here is a starting…

CardinalFIB
- 41
- 3
4
votes
0 answers
How to translate the canvas and still get the touch events on the correct places
I'm trying to create a custom AbsListView (overriding the same stuff on ListView, GridView and HeaderGridView) that will relocate all its drawing and touching events based on an external factor (other stuff that moves on the layout).
Paddings are…

Budius
- 39,391
- 16
- 102
- 144
4
votes
3 answers
View.OnTouchListener() does not work on parent layout
I've set a View.OnTouchListener on a parent layout, but it doesn't appear to work.
Here is the XML for the UI:

Hong Wei Wang
- 1,388
- 3
- 19
- 29
4
votes
0 answers
Crop an image by making a gesture Android
I want to crop an image when you make a 'Square' gesture on that image. It should take the nearest possible square or rectangle and crop the region inside the drawn gesture.
Is it possible to get the co-ordinates of the drawn square with respect to…

Mack
- 45
- 4
4
votes
1 answer
SimpleOnGestureListener onFling velocity direction issue
I implemented a SimpleOnGestureListener on this Android app and it's the basic implementation and it's all working as it should:
the class implements OnTouchListener and I set it as TouchListener for the correct View, on the touch event I call my…

Budius
- 39,391
- 16
- 102
- 144