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

271 questions
0
votes
1 answer

Best practice for onFling() in android?

What is the difference with this two methods? @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { return super.onFling(e1, e2, velocityX, velocityY); …
Piolo Opaw
  • 1,471
  • 2
  • 15
  • 21
0
votes
1 answer

Android: reference to view outside fragment | gesture listener in fragments

I have a TextView in a fragment where I want to set different texts when the gesture is detected. @Override public boolean onTouchEvent(MotionEvent event) { this.gestureDetector.onTouchEvent(event); return super.onTouchEvent(event); } The…
xXJJJasonMokXx
  • 367
  • 4
  • 17
0
votes
1 answer

Using pinch zoom, drag and drop on same view

I want to use both pinch zoom and drag n drop on the same view in my app. I am able to implement them individually but when I try to use both it doesn't work. Here is the code for dragging class MyClickListener implements OnLongClickListener { …
Amanni
  • 1,924
  • 6
  • 31
  • 51
0
votes
2 answers

how can i swipe views in android

I have two images in a framelayout. i want to be able to touch the screen and slide the top image to the left reveling the second image. I tried to do this by using ontouch listener. I cant seem to get it working. The first image stretches. any…
0
votes
1 answer

detecting Android gestures of alphabets using gesture overlay

I am developing an application in which English alphabet will be written in gestures format and those alphabets will be written in the text view, but my problem is my app is not detecting the gestures correctly even I have different gestures for the…
0
votes
2 answers

Horizontal swipe gesture detection Android

I have already created an app that has one activity which has many fragments implemented with tablistener. I now want to add horizontal swipe gestures between the fragments but its proving very difficult. My first question is, is there a way to just…
0
votes
0 answers

ImageView Pinch Scaling

Right now I have a layout that contains two imageviews, one in the background and one in the front that is a icon. Both of them will merge together as a single image and save it to sd card. The image of the icon can be move around before the user…
thhVictor
  • 338
  • 6
  • 25
0
votes
1 answer

How to call onListItemClick if we are also using onTouchListener in ListView in android?

When I add ontouchListener in my listview the onListItemClick is not working. I want to use OnTouchListener for fling and onListItemClick for single click in the listview because I'm using the position from onListItemClick to create new activity and…
Piolo Opaw
  • 1,471
  • 2
  • 15
  • 21
0
votes
0 answers

How to control item's View of ListView by GestureDetector?

I set a onTouchListener to ListView, I want to control the item's view of my ListView, but I found methods in SimpleOnGestureListener,there are no View parameter to given, so how can I control item of ListView? add: a XML for layout of item,I use…
krosshj
  • 855
  • 2
  • 11
  • 25
0
votes
1 answer

how to intercept horizontal flings on children of an android ListView

I'd like to respond to horizontal "fling" gestures on individual cells in a vertically scrolling ListView. Currently I've accomplished this by using a GestureDetector for each cell view in the list. I'm noticing, though, that it's much harder to…
jph
  • 2,181
  • 3
  • 30
  • 55
0
votes
1 answer

Android "hover" event in custom layout

I have a custom layout that I have written that basically just displays a bunch of ImageViews. I am handing onTouch events for all the ImageViews in my layout. However, if a user touches one imageView and then drags over another ImageView, I would…
k_day
  • 1,379
  • 2
  • 14
  • 19
0
votes
0 answers

What are correct callback methods to implement custom toolbar with scrolling and various gesture features?

Implement ToolBar control with custom view regarding: The goal is to achieve the scrolling features using Xamarin.Android framework and without using ActionBar according my business requirement. The required features are left and right swipe, drag…
0
votes
1 answer

GestureOverlayView hiding its child/hidden behind parent

I have problem with gesture overlay. I have designed a gallery with split view. And over that I want gesture recognition. Earlier I didnt have a split view, so that time I was using gesture overlay as parent, it was working fine. But now in split…
Mack
  • 45
  • 4
0
votes
1 answer

Double Tap in android View

In a view I want to detect both single tap and double tap. It works fine with me. I can detect both single and double tap. Please find my code @Override public boolean onTouch(View view, MotionEvent me) { // No dragging during animation…
Zach
  • 9,989
  • 19
  • 70
  • 107
0
votes
1 answer

error in onDraw function in android?

I have implement the onTouchListener, error on onDraw function in this class i put the capital letter and small letter on first of function name dost not clear, it displayed remove @override annotation public class bsdselect extends Activity…
ibu
  • 577
  • 4
  • 9
  • 24