alexvasilkov / GestureViews

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

Can I revert to the original size of the image view when I release my hand? #143

Closed sinwho closed 4 years ago

sinwho commented 5 years ago

Can I get back to normal when I turn my finger on the screen during multi-zoom?

mahditakrim commented 4 years ago

Hi @sinwho , Could you please explain the issue a little bit more and address the class or directory of cause (where you handle touch events of the screen) so I can work on it ?

alexvasilkov commented 4 years ago

Hi, sorry for late response. I beleive that you can achive the desired behavior (returning the image to initial state after zoom gesrture) using the next settings:

settings.setMaxZoom(0.01f);
settings.setOverzoomFactor(10f);

Or in xml:

app:gest_maxZoom="0.01"
app:gest_overzoomFactor="10"

Basically you are asking the image to not zoom beyond min zoom level. And big "overzoom" factor makes it easier to zoom-in the image with pintch gesture.