From 6e2e3c139c39fdd61bc6f1434d84ed6fcfee3eb2 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Tue, 8 Jun 2021 12:08:32 -0400 Subject: [PATCH] close #1336 --- .../instagrabber/dialogs/ProfilePicDialogFragment.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/awais/instagrabber/dialogs/ProfilePicDialogFragment.java b/app/src/main/java/awais/instagrabber/dialogs/ProfilePicDialogFragment.java index e1915f8d..0ae0bbfb 100644 --- a/app/src/main/java/awais/instagrabber/dialogs/ProfilePicDialogFragment.java +++ b/app/src/main/java/awais/instagrabber/dialogs/ProfilePicDialogFragment.java @@ -27,6 +27,8 @@ import com.facebook.imagepipeline.image.ImageInfo; import java.io.File; import awais.instagrabber.R; +import awais.instagrabber.customviews.drawee.AnimatedZoomableController; +import awais.instagrabber.customviews.drawee.DoubleTapGestureListener; import awais.instagrabber.databinding.DialogProfilepicBinding; import awais.instagrabber.utils.AppExecutors; import awais.instagrabber.utils.Constants; @@ -182,6 +184,13 @@ public class ProfilePicDialogFragment extends DialogFragment { }) .build(); binding.imageViewer.setController(controller); + final AnimatedZoomableController zoomableController = (AnimatedZoomableController) binding.imageViewer.getZoomableController(); + zoomableController.setMaxScaleFactor(3f); + zoomableController.setGestureZoomEnabled(true); + zoomableController.setEnabled(true); + binding.imageViewer.setZoomingEnabled(true); + final DoubleTapGestureListener tapListener = new DoubleTapGestureListener(binding.imageViewer); + binding.imageViewer.setTapListener(tapListener); } private void downloadProfilePicture() {