Tapping on an image opens pinch-to-zoom view#1491
Conversation
|
Thank you, this would have fixed #616. But i do not want to add a dependency to an unmaintained lib (https://github.com/Baseflow/PhotoView). Last commit was 6 years ago, last tag/release ~8 years ago. |
Strubbl
left a comment
There was a problem hiding this comment.
as stated above, if we introduce a new dependency it should at least be maintained
|
Replaced PhotoView with https://github.com/panpf/zoomimage which seems to be maintained. |
Strubbl
left a comment
There was a problem hiding this comment.
Thank you for the update of the dependency. What do you think about my review comments?
There was a problem hiding this comment.
I hope this file did not serve any purpose.
| // Fall back to loading from network | ||
| try { | ||
| URL url = new URL(imageUrl); | ||
| try (InputStream is = url.openStream()) { |
There was a problem hiding this comment.
Can you change this to use the OkhttpClient here? WallabagConnection.createClient() could be reused (automatically reusing the app's global network settings).
| return null; | ||
| } | ||
|
|
||
| // Canvas hardware-accelerated draw limit is ~100MB; cap at 4096px (64MB @ ARGB_8888). |
There was a problem hiding this comment.
64 MB is a lot, maybe we need to catch any OOM errors when we use this high resolution? This might be an issue esp. with low-end devices.
| android:configChanges="keyboardHidden|orientation|screenSize"/> | ||
| <activity | ||
| android:name="fr.gaulupeau.apps.Poche.ui.ImageViewActivity" | ||
| android:theme="@style/Theme.AppCompat.NoActionBar" /> |
There was a problem hiding this comment.
We should add the android:configChanges="keyboardHidden|orientation|screenSize" here, analog to the other activities, so that this image view acitvity does not get recreated when we rotate the phone while viewing the image.
Some images embedded in articles become too small to see the details when viewed on a mobile/e-reader device. This change adds the capbility to open a zoomable view of an image by tapping on it. Tapping again closes the view.
Details: