Questions tagged [onfling]

The onFling method is the method detecting the Fling motion will catch a horizontal swipe, either from left to right, or from right to left. It is called when the user swipe on the screen and must return either true or false.

147 questions
0
votes
1 answer

How to receive events from OnGestureListener

I created a class that implements GestureDetector.OnGestureListener. However, I do not know how these methods get called. Is there something like view.setOnTouchListener() for a GestureListener that allows you to receive the events? Thank you in…
Derek Dawson
  • 374
  • 3
  • 12
0
votes
0 answers

I can't implement onFling, onScroll and more methods

I am trying to work with OnGestureListener , like I saw here : http://mrbool.com/how-to-work-with-swipe-gestures-in-android/28088 My goal is to move some Canvas Rectangle view to the right with swipe. I want the rectangle to get moved to the right…
0
votes
1 answer

Gesturedetector and registerForContextMenu

I am turning insane over here trying to understand why i find nothing about this and why it does not work. I am using an onFling to do some actions. Working perfectly. But i would like to add an onlongpress which would open a context menu. The…
0
votes
1 answer

Android just like gallery, how to fling fast to change image fast in single Imageview

My requirement is on touch move I have to change image in image view.If user fling fast based on velocity I want to get fling speed interval and change image. I am able to get X and Y velocity, but based on velocity how to find timer interval to…
AbiAndroid
  • 89
  • 2
  • 4
  • 14
0
votes
1 answer

OnFling is not called on the last listview Item

I have implemented a gesture detector for my listview items, where onfling gesture is detected, two buttons will be shown. The first few list items worked fine. However when I scroll to the bottom of my listview, onfling will not work for the last…
XXX
  • 273
  • 1
  • 2
  • 9
0
votes
0 answers

How can I filling progressbar by scroll?

I want to fill progressbar when I swipe my hand on the phone. I think I should use scroll method or onfling method. But how can I understand how much I swipe? I use this code : @Override public boolean onScroll (MotionEvent e1,…
user3086226
  • 93
  • 1
  • 6
  • 18
0
votes
1 answer

OnFling method not functioning in app

I implemented an onFling() in each of my activities which was supposed to navigate between the previous and next activity using intents. But when I run the app it doesn't work and it won't show up in my log cat.Is there another way I should be…
Brian J
  • 5,416
  • 19
  • 94
  • 189
0
votes
2 answers

ListView stopped accepting basic gestures after setting custom GestureListener

I have created a GestureListener with a customized onFling method. I didn't override onScroll or onSingleTapConfirmed. I created the listener like this: ListView listView=(ListView)findViewById(android.R.id.list); final GestureDetector…
Nestor
  • 7,076
  • 5
  • 60
  • 117
0
votes
1 answer

How do detect onfling inside onscroll in android?

The problem is I would like to call some function when onscroll is firing but not onfling. However, I found that if the onfling is trigger , it comes with the onscroll. I notice the difference between them is onscroll + tapUp = onfling. So I would…
user782104
  • 12,011
  • 51
  • 154
  • 289
0
votes
1 answer

onClickListener not letting onFling trigger

I have both an onClickListener and an onFling (using GestureDetector). If I click on the button the onClickListener fires. If I fling on the body of the screen then onFling fires. However if I start the fling from the button, then neither…
dubman23
  • 3
  • 3
0
votes
1 answer

Bouncing back on the edges

I am trying to make a small game where you can fling a coin on the screen. while i was searching for that kind of animation i found this page http://mobile.tutsplus.com/tutorials/android/android-gesture/ I managed to customise the events according…
koraxis
  • 781
  • 2
  • 11
  • 22
0
votes
1 answer

When onFling is performed?

I don't understand when onfling (from OnGestureListener) is performed. Only works when I shake the mouse through the emulator screen. Thanks!
user2383054
  • 115
  • 1
  • 1
  • 9
0
votes
1 answer

Horizontal Fling starts only on offset 0

I am trying to implement fling. Problem is that I get it only when the X is on offset 0 (which means on the edge of the screen). When I try to have a fling in the middle of the screen nothing happens. This happens only on X. Y behaves OK. Here is…
0
votes
2 answers

OnFling is not detected in low velocities

I am implementing OnFling. It works only when the velocity is very high. Which means i need to move my finger very very fast so that the Fling will take place. this is the code: SimpleOnGestureListener simpleOnGestureListener = new…
0
votes
1 answer

onFling() gestures not being accurate

So, I have the following body for my onFling() method: public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { try { // Left swipe if ( velocityX <…
Jon
  • 55
  • 6
1 2 3
9
10