Browse Source

close #1336

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
6e2e3c139c
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 9
      app/src/main/java/awais/instagrabber/dialogs/ProfilePicDialogFragment.java

9
app/src/main/java/awais/instagrabber/dialogs/ProfilePicDialogFragment.java

@ -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() {

Loading…
Cancel
Save