Questions tagged [android-gesture]

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.

Gesture API

264 questions
43
votes
2 answers

android - How can I make a button flash?

Is there any way, in code, to make a button flash continually and then stop flashing when pressed?
ron
  • 4,921
  • 7
  • 36
  • 43
33
votes
6 answers

Can we use scale gesture detector for pinch zoom in Android?

Can we use scale gesture detector for pinch zoom in Android?
user562237
  • 747
  • 5
  • 15
  • 24
27
votes
3 answers

Actionbar's onNavigationItemSelected(int position, long itemId) not triggered after horizontal swipe in Gingerbread

I have implemented Tab view as well as Horizontal swipe view(to change tabs) with Navigation mode as Lists for the application. I am using ActionBarSherlock & TabPageIndicator. I used fragments for reloading the contents after changing the tabs. In…
Ningan
  • 291
  • 2
  • 4
22
votes
3 answers

Different fling (swipe) velocity on different Android devices with same density

I'm writing my own image viewer that enables users to swipe left\right to see the next\previous image. I want to animate the image change according to the fling velocity. To detect a fling gesture and its velocity, I followed this basic gesture…
Ron Tesler
  • 1,096
  • 1
  • 11
  • 23
18
votes
2 answers

MultiSelect gesture like Google Photos app

I want to implement multi select gesture in my app like in new Google Photos App here: I have tried following this answer, but couldn't do this. Can anyone just guide me?
14
votes
3 answers

How to implement a "Two Finger Drag" gesture on Android?

I am new to Android development and am working on an accessibility research project for blind people (Jelly Bean API level 17 project). I have been experimenting with some gestures and the Two-Finger-Drag gesture has been really tough to implement.…
Adit Gupta
  • 803
  • 3
  • 8
  • 22
14
votes
2 answers

MotionEvent.getPointerCount() is always 1

I'm somehow getting unexpected results while trying to implement multitouch in my app. I'm never getting data for more than one pointer. Multitouch on my phone surely works, because I can pinch-zoom in browser and detect pinch gesture with…
Axarydax
  • 15,785
  • 19
  • 85
  • 147
13
votes
1 answer

Difference between onScroll() and onFling() of GestureDetector

What is the difference between onScroll() and onFling() in the GestureDetector interface? When I print out the events they are showing the exact same things. At least the last onScroll() and the onFling(). The only true difference I noticed is that…
Mulgard
  • 8,305
  • 26
  • 110
  • 205
11
votes
2 answers

Wrong scale position after applying zoom effect on Android canvas

First of all this is a follow up question originally asked here, Pan, Zoom and Scale a custom View for Canvas drawing in Android Since there was no answer yet, I finally solved my issue using the android-gesture-detectors After applying the…
11
votes
3 answers

How to zoom list item from center of pinch

I am working on a simple book reader app for Android. I have used the listview for this. What I am doing is loading the remote images from server into my Listview (Using the picasso library) and is working fine. I also wanted to zoom functionality…
Qadir Hussain
  • 8,338
  • 11
  • 82
  • 117
10
votes
2 answers

Android drag and return to previous activity like Facebook and Google Photos

I have been finding a way to implement animation like Facebook and Google Photos. When in 2nd Activity, when dragging images the images follow and the 2nd Activity started to fade out and we see 1st Activity. Images of what I was trying to ask is…
10
votes
3 answers

How to capture the onSwipeDown event on google glass using a native app?

I was able to capture most of the events triggered by the touchpad of a google glass using the SimpleOnGestureListener in a native app. With the following code you can capture these events MainActivity.java: private GestureDetector…
Alex
  • 191
  • 7
10
votes
4 answers

Could not get Touch event for TYPE_SYSTEM_OVERLAY

I like to develop an app that is similar to Swapps .i am trying to display a button on top of any screen and that should occur only on a swiping action.I tried with the below code WindowManager.LayoutParams params = new…
ganesh
  • 1,217
  • 6
  • 23
  • 44
9
votes
1 answer

rotation and scaling using multi touch in android

i want to rotate and scale the image on multi touch event, i am able to drag, scale the image but i can't understand the rotation of image. i am facing problem so please help me asap. my code is there public class Touch extends Activity…
Ramesh Sudrasana
  • 91
  • 1
  • 1
  • 4
9
votes
1 answer

Android O - fingerprint gesture callback not working

I am testing on Pixel device with Fingerprint Gestures ON from accessibility. I am trying to get the gesture callbacks using FingerprintGestureController but never getting any gestures in return even after I turn the accessibility ON for this app…
1
2 3
17 18