xiongdi
xiongdi

Reputation: 41

tap on image view to start an activity and implementing pinch zoom on the same image view in android

Is there any possible way to perform single tap to start another activity on image view and implement pinch zoom on the same image view, I did both independently.

My problem is I don't know if it is possible to integrate them since they both use the event .ACTION_DOWN

Any help will be appreciated.

Upvotes: 0

Views: 355

Answers (2)

Sam
Sam

Reputation: 86958

You need to use GestureDetectors, they make these distinctions for you:

Upvotes: 1

Artyom Kiriliyk
Artyom Kiriliyk

Reputation: 2513

You can use onDoubleTap instead of single Tap:

@Override
public boolean onDoubleTap(MotionEvent e)
{
    //open dialog with your image and zoom it
{

Upvotes: 0

Related Questions