Open waterdrake opened 1 year ago
Currently, I use this to zoom out to full screen:
ZoomSurfaceView.zoomSurfaceView.zoomTo(1, true)
But it does not center the view when I do that, it just zooms out and if you were panning, it just zooms out to where the center point of your pan was.
Is there a way to zoom to 1 and also have it zoom to the center?
I don't think there is an API for that atm. You would have to manually calculate the target position and use the moveTo() method.
moveTo()
So use zoomImageView.moveTo(zoom, x, y, true);?
zoomImageView.moveTo(zoom, x, y, true);
Yes. See: https://natario1.github.io/ZoomLayout/docs/pan-apis
Currently, I use this to zoom out to full screen:
ZoomSurfaceView.zoomSurfaceView.zoomTo(1, true)
But it does not center the view when I do that, it just zooms out and if you were panning, it just zooms out to where the center point of your pan was.
Is there a way to zoom to 1 and also have it zoom to the center?