question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

3reactions
baldermorkcommented, Dec 13, 2016

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.

1reaction
maciej-kaznowskicommented, Jul 3, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image being flipped vertically when using one finger ... - GitHub
Double tapping the image and scrolling up and down to results in the image being "fliped" or rotated 90 degrees. The result is...
Read more >
Basic touchscreen gestures in Pages on iPad - Apple Support
Basic touchscreen gestures in Pages on iPad ; Tap · One finger tapping a shape. ; Scroll, swipe, flick · A finger swiping...
Read more >
Manually rotating video - Zoom Support
If your camera is displaying upside-down or sideways in the Zoom desktop client, you can ... Click your profile picture then click Settings....
Read more >
touch-action - CSS: Cascading Style Sheets - MDN Web Docs
The touch-action CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built ...
Read more >
Navigate the Photos Interface - Take Control Books
You can zoom in and out on your collection by clicking the left and right arrow buttons at the top-left corner of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found