fresco icon indicating copy to clipboard operation
fresco copied to clipboard

How can I reset zoom in ZoomableDraweeView

Open rafaelekol opened this issue 10 years ago • 2 comments

I need to reset zoom programmatically to scale 1 for zoomed image in ZoomableDraweeView.

rafaelekol avatar May 06 '16 11:05 rafaelekol

You need to get the ZoomableController from the ZoomableDraweeView after which you can do various things with it. If you haven't set a custom ZoomableController and are just using the one created automatically by the view, it will be an instance of AnimatedZoomableController. Btw, check out zoomToPoint method too.

AnimatedZoomableController zoomableController = (AnimatedZoomableController) zoomableDraweeView.getZoomableController();
zoomableController.reset();

plamenko avatar May 17 '16 16:05 plamenko

Thanks a lot.

rafaelekol avatar May 19 '16 08:05 rafaelekol