Skip to content

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

@bartek-wesolowski

Description

@bartek-wesolowski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions