MikeOrtiz / TouchImageView

Adds touch functionality to Android ImageView.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calling setZoomAnimated() twice with the same point causes a glitch

bartek-wesolowski opened this issue · comments

When you call setZoomAnimated() with some parameters and then do it again with exactly the same parameters then the focus is animated from an unexpected point to the target point. I'd expect the animation to not be run if I call setZoomAnimated() twice with the same parameters without changing the zoom or focus in the meantime.

Steps to reproduce
In AnimateZoomActivity you can add this fragment:

        binding.imageSingle.setOnClickListener {
            binding.imageSingle.setZoomAnimated(2f, 0.7f, 0.7f)
        }

Click the image to trigger the animation and then do it again. You'll notice that something is not right.

closed with #514