alexvasilkov / GestureViews

ImageView and FrameLayout with gestures control and position animation
Apache License 2.0
2.38k stars 384 forks source link

Feature request: disable pinch to close #114

Closed mr-thierry closed 6 years ago

mr-thierry commented 6 years ago

Currently, if the user pinch the image below EXIT_THRESHOLD, an exit animation is automatically called. This is not the behaviour that I want in my app. :)

I suggest making EXIT_THRESHOLD a config parameter. So I could change the exitThreshold to something like 0F to disable this behaviour.

alexvasilkov commented 6 years ago

Do you want to disable all exit gestures or only pinch-to-exit?

alexvasilkov commented 6 years ago

Ah, sorry, you clearly stated it in the subject line, which rarely happens :)

Thanks for feedback, I'll check how it can better be done.

alexvasilkov commented 6 years ago

Added in v2.5.2.

You can enable only scroll-to-exit gesture with:

image.getController().getSettings().setExitType(Settings.ExitType.SCROLL);