alexvasilkov / GestureViews

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

The Image is clipped when the destination is inside a ScrollView #151

Closed mr-thierry closed 4 years ago

mr-thierry commented 4 years ago

If I put the destination inside a ScrollView, the image is clipped during the animation.

Is there anyway to avoid this clipping, or this is a limitation of the Library?

I have forked and modified the repo. See https://github.com/thierryd/GestureViews The only modification is that I have added a ScrollView in demo_item_photo_full.xml

alexvasilkov commented 4 years ago

Thanks for reporting the issue and the example. I was able to reproduce and fix it.

The issue consists of 2 parts:

alexvasilkov commented 4 years ago

New v2.6.0 will be available in few hours.

mr-thierry commented 4 years ago

It look fine now. Good work! :) But.... If I set clipChildren=false in the parent LinearLayout, then zooming the image (by double tapping it) makes the image go outside its bounds (which make sense ;) ) So what I ended up doing is:

alexvasilkov commented 4 years ago

Yeah, indeed, removing clipping will make it look strange enough. But I think your solution is very good. I can enforce bounds clipping but exit animation will not look good anyway, so I can't see better options.