Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pinch to zoom for images #1367

Open
hamuchen opened this issue Jan 19, 2024 · 4 comments
Open

Add Pinch to zoom for images #1367

hamuchen opened this issue Jan 19, 2024 · 4 comments

Comments

@hamuchen
Copy link

hamuchen commented Jan 19, 2024

I read my feeds in this app, obviously. I read comics, but also in articles I sometime want to zoom in to see a detail or read small text in the image. Now I need to open the article in the browser, scroll to where I was, then zoom in. It would be awesome to zoom in right in this app.

Thanks and cheers
hamu

@David-Development
Copy link
Member

@hamuchen Thank you for the feedback.

A thought that comes to mind: If we allow zooming it would be counter intuitive with being able to scroll horizontally between articles. Imagine you are zooming in on something in the article and then you start scrolling horizontally because you want to go to the next article - you'd either have to scroll to the border of the article and trigger to get to the next page or zoom out completely. But then again.. it's the same awkward UX as e.g. WhatsApp has when you look at a bunch of pictures.

Should be fairly simple to implement - probably just need to adjust the following line:

builder.append(String.format("<html dir=\"%s\"><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0\" />", rtlDir));

@stefan-niedermann
Copy link
Member

Hm, maybe it's possible to detect starting a pinch to zoom gesture (two fingures) and disable horizontal swiping in this case? When ending the pinch gesture, reenable horizontal swiping.

I remember a similar issue in the Notes app (vertical scrolling vs. swipe horizontal to delete) which had a similar "fix"

@hamuchen
Copy link
Author

Or you enable press / long press to open the image in a modal / fullscreen dialog where you can pinch to zoom?

@kuba-orlik
Copy link

@David-Development

A thought that comes to mind: If we allow zooming it would be counter intuitive with being able to scroll horizontally between articles. Imagine you are zooming in on something in the article and then you start scrolling horizontally because you want to go to the next article - you'd either have to scroll to the border of the article and trigger to get to the next page or zoom out completely.

I remember looong time ago an iOS app that worked like this: if you pan the image right to left, and pan it to the absolute max, then the panning stops and there's this "there's nothing more to the right" animation effect on the right edge of the screen. But if you release your finger and then start swiping from right to left, then the image gives way and you can see the next news item slide in from the right.

But @hamuchen's suggestion to just have the ability to open the image standalone in fullscreen mode sounds much simpler to use (and possibly to implement, as well 🤞 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants