This commit is contained in:
Austin Huang 2021-06-08 12:08:32 -04:00
parent 54ff196bb1
commit 6e2e3c139c
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -27,6 +27,8 @@ import com.facebook.imagepipeline.image.ImageInfo;
import java.io.File; import java.io.File;
import awais.instagrabber.R; import awais.instagrabber.R;
import awais.instagrabber.customviews.drawee.AnimatedZoomableController;
import awais.instagrabber.customviews.drawee.DoubleTapGestureListener;
import awais.instagrabber.databinding.DialogProfilepicBinding; import awais.instagrabber.databinding.DialogProfilepicBinding;
import awais.instagrabber.utils.AppExecutors; import awais.instagrabber.utils.AppExecutors;
import awais.instagrabber.utils.Constants; import awais.instagrabber.utils.Constants;
@ -182,6 +184,13 @@ public class ProfilePicDialogFragment extends DialogFragment {
}) })
.build(); .build();
binding.imageViewer.setController(controller); 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() { private void downloadProfilePicture() {