Browse Source

fix picture zooming issue

Co-Authored-By: Ammar Githam <[email protected]>
renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
23a5ae8405
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 2
      app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java

2
app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java

@ -1022,6 +1022,8 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment im
// binding.postImage.setOnClickListener(v -> toggleDetails()); // binding.postImage.setOnClickListener(v -> toggleDetails());
final AnimatedZoomableController zoomableController = AnimatedZoomableController.newInstance(); final AnimatedZoomableController zoomableController = AnimatedZoomableController.newInstance();
zoomableController.setMaxScaleFactor(3f); zoomableController.setMaxScaleFactor(3f);
zoomableController.setGestureZoomEnabled(true);
zoomableController.setEnabled(true);
binding.postImage.setZoomableController(zoomableController); binding.postImage.setZoomableController(zoomableController);
binding.postImage.setTapListener(new GestureDetector.SimpleOnGestureListener() { binding.postImage.setTapListener(new GestureDetector.SimpleOnGestureListener() {
@Override @Override

Loading…
Cancel
Save