Photoview: Image being flipped vertically when using one finger zoom (double tap)

Created on 29 Sep 2016  路  5Comments  路  Source: Baseflow/PhotoView

Double tapping the image and scrolling up and down to results in the image being "fliped" or rotated 90 degrees. The result is the image being upside down. if you repeat the process to returns to its original state.

Any way of disabling this one finger scrolling for the time being?
By the way, I'm using PhotoView inside a full screen activity with Picasso.

        photoView = (PhotoView) findViewById(R.id.fullscreen_content);

        String imageUrl = getIntent().getStringExtra(EXTRA_IMAGE);
        attacher = new PhotoViewAttacher(photoView);
        Picasso.with(this).load(imageUrl).into(photoView, new Callback() {
            @Override
            public void onSuccess() {
                attacher.update();
            }

            @Override
            public void onError() {

            }
        });

I'm not sure I'm using this the right way either, but consuming the event does not disable double tap zooming

        photoView.setOnDoubleTapListener(new GestureDetector.OnDoubleTapListener() {
            @Override
            public boolean onSingleTapConfirmed(MotionEvent e) {
                return true;
            }

            @Override
            public boolean onDoubleTap(MotionEvent e) {
                return true;
            }

            @Override
            public boolean onDoubleTapEvent(MotionEvent e) {
                return true;
            }
        });

https://goo.gl/photos/uLZbtDebGJMfA2aj9

Most helpful comment

It looks like ScaleGestureDetector broke this form of scaling gesture in Nougat. I reported an issue here: https://code.google.com/p/android/issues/detail?id=230118

One possibility would be to call ScaleGestureDetectorCompat.setQuickScaleEnabled(mDetector, false) in FroyoGestureDetector.java if we're running on a Nougat devices.

All 5 comments

It looks like ScaleGestureDetector broke this form of scaling gesture in Nougat. I reported an issue here: https://code.google.com/p/android/issues/detail?id=230118

One possibility would be to call ScaleGestureDetectorCompat.setQuickScaleEnabled(mDetector, false) in FroyoGestureDetector.java if we're running on a Nougat devices.

Facing the same issue. Isn't it still fixed?

It has been fixed. Update to the latest version.

I'm using '2.1.3' version but isee that now it has '2.3.0' . I'll recheck it. Thanks
In which version was it fixed, any idea?

Fixed here: https://github.com/chrisbanes/PhotoView/pull/667 so it is from 2.3.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhangzhen92 picture zhangzhen92  路  11Comments

hameno picture hameno  路  3Comments

nithinpmolethu picture nithinpmolethu  路  11Comments

misakuo picture misakuo  路  7Comments

stoefln picture stoefln  路  5Comments