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.
Questions tagged [onfling]
143 questions
0
votes
1 answer
Are "swipe" and "fling" the same in iOS
I am very new to iOS, in Android developing, I understand the fling gesture, but I cannot find the fling in iOS but find swipe gesture, if I want to implement fling up and down, I need to add two UiSwipeGestureRecognizers and set the direction as…

wangshaoping
- 83
- 13
0
votes
0 answers
How to detect gestures on buttons inside Dialog in Android
I have tried to extend GestureDetector.SimpleOnGestureListener class to detect gestures on Dialog, it worked for me but it does not detect single tap, on down, scroll, etc. events on any button, checkbox, radio button in the dialog, it's only…

zeeshanali
- 1
- 4
0
votes
1 answer
Google Maps fling event
Is there any way to disable fling gesture on google map (SupportMapFragment)? Or I need at least an event to detect when map scrolling ends after fling and to compute map camera location.
Thanks.

ibogolyubskiy
- 2,271
- 3
- 26
- 52
0
votes
1 answer
Track mouse position to create onfling gesture in javascript
What type of event can I use to track the mouse to create an onfling gesture in javascript?I have thought to something but nothing...

accaacco
- 17
- 4
0
votes
1 answer
Reproduce android's onfling event in javascript
I want to reproduce android's fling event in javascript.What I don't understand is what type of mathematical function I have to use.I know that I have to calculate how many pixels the mouse is been moved in a specific time and do the fling animation…

accaacco
- 17
- 4
0
votes
1 answer
Detecting Fling touch in App
I am Trying to implement a swipe touch to control the paddle in the app, I've managed to get the paddle move by detecting a single touch but I can't understand how to make a fling work. I've tried implementing ths solution by referring the official…

nabeel
- 425
- 1
- 9
- 22
0
votes
1 answer
Slide effect in onFling android
I've this code to swipe many images that i have in a string[]
public class SlideShowUserImages extends ImageView implements TargetLoaded {
private String[] urls;
private int curPos = 0;
private int imagesSize = 0;
private GestureDetector…

Gustavo Piris
- 68
- 12
0
votes
2 answers
How to change images in imageview on fling
I have a relative layout which contains an image. I have like 10-20 images in drawable folder and a hashmap which stores these images.
On swiping below the image from left to right, it should change to next image.
On each swipe, it should change to…

Chiranth Bs
- 53
- 6
0
votes
0 answers
Android onFling() method not firing
I'm trying to create gesture recognition in my Android app that will respond to the fling gesture and change the view accordingly. A little background info: my activity consists of two side by side views in a Linear layout.
The problem i'm having…

Cody
- 1,801
- 3
- 28
- 53
0
votes
1 answer
GestureDetector working only on part of the activity
I have an activity that implements onGestureListener and I have some code in its onFling method. The xml layout I am using for this activity contains a Linear layout (vertical) wrapping a relative layout and a custom layout class.
This custom layout…

Shreya
- 241
- 1
- 2
- 11
0
votes
1 answer
RecyclerView smoothScrollBy over scrolls the content with on fling gesture
Every time fling gesture is detected in Recycler View, I would like to smooth scroll right a value, usually it's a width of recycler view (getWidth of RecyclerView).
The problem is that fling is usually detected with onTouchEvent which "drags" the…

Mazur
- 56
- 4
- 11
0
votes
0 answers
Button not clickable after onFling()
I want to be able to click and swipe on my Buttons. But once I implemented the onFling method, I am unable to click on the Buttons. Does anybody know how to fix this?
Here is my code:
protected void onCreate(Bundle savedInstanceState) {
…

user2456977
- 3,830
- 14
- 48
- 87
0
votes
2 answers
onFling and LinearLayouts
My Linear Layout: main_linear_layout contains four Linear Layouts: ll1 ll2 ll3 ll4. Each LinearLayout contains Buttons. I am trying to implement the onFling method on main_linear_layout. I want to be able to swipe anywhere on the Layout of Buttons…

user2456977
- 3,830
- 14
- 48
- 87
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
- 502
- 5
- 14
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…

Hedi
- 3
- 5