Reputation: 2116
I have an activity in which i have set an imageView. OnFling i load another image and onClick on the image i have to go to another activity.
Now the problem is that when i try to fling/swipe on the imageView its onClick is called so fling() is not executed. How to resolve this. Thanks in advance
Upvotes: 1
Views: 377
Reputation: 2116
you can give onClick() to all other views do nothing in them. Now in onSingleTapUp() write the imageView's onClick() body
Upvotes: 0
Reputation: 7081
Rather use the onTouchEvent
in the GestureDetector
class to do the work of your onClick
method. You can use the MotionEvent
actions to determine if it was a click or not.
Upvotes: 1