Image Viewer | Pinch to zoom | Double Tap to zoom | Animated Zoom

Please add cache.

Awesome extension. Thank you!

What would it take to implement a swipe left, right, up, down action to an image that’s at scale to fit?

Again Awesome Extension Superb :love_you_gesture: :love_you_gesture:
Can we use multiple Images
I mean If Slide right then open next image & If slide left then open previous Image ??
Is it possible ??

2 Likes

You can use my view pager extension and this one to acheive what you want

1 Like

@zainulhassan I’m having a problem when I load multiple images into an arrangement using imageviewer .Create.

It seems like each previous image is not “unloaded” and by the time I get to about to the 30th image, the phone slows right down and the zoom function is very slow.

If I zoom each image before I load the next, I can see the previous images under the latest image (image size is smaller than the arranbgement size, so there’s a band at the top and bottom).

Am I missing an unload function?

1 Like

When you use the create block it creates a new image view each time. So thats why older images are still visible. If you want to view multiple images in only one image viewer by replacing the previous ones, use this block to update new path :

1 Like

Thank you @zainulhassan I will try this when I’m back at the machine.

In theory, I feel I should use the .Create block as a setup function (perhaps with a blank image) and just use the .Path function to load each of my images when I’m ready to load them.

1 Like

I’m having a problem when I load multiple images into an arrangement using imageviewer .Create.

It seems like each previous image is not “unloaded” and by the time I get to about to the 30th image, the phone slows right down and the zoom function is very slow.

If I zoom each image before I load the next, I can see the previous images under the latest image (image size is smaller than the arranbgement size, so there’s a band at the top and bottom).

Am I missing an unload function?

Solved, thanks to @zainulhassan.

I set up the view first using:

and then call a new path for each image (in my case the image paths are stored in a list)

Works perfectly.

1 Like

I have 1 problem :
java.lang.NoClassDefFoundError: com.github.chrisbanes.photoview.PhotoViewAttacher
Note: A report on another error will appear no earlier than 5 seconds later.

My app and Demo app does not work.

Post your blocks with error here.

Sorry, now it is working. May be i had troubles with emulator and images link. Thank you.

1 Like

@zainulhassan Any chance you could include some simple swipe (left right up down) handlers into the extension?

Capture
The image can’t open. is there something wrong with my block ?

see the overview here

you might want to load the image from the ASD

Taifun

Hi Zain,

This is honestly an amazing extension. :grinning: I was hoping to use this in an app I’m trying to make. Part of the app is to save a layout live in the app and then display that layout again to zoom and pinch like this ext provides.

So, I’m using ComponentToImage ext which saves a layout to the ASD (I have verified that image does successfully save there), and then trying to use your extension through the local path, but I’m not getting it right for some reason. I have tried various path possibilities before posting here, including one ASD example given above. I did check out the aia and that works with the URL which is cool. I did test successfully from assets too, just not with the comp’s locally saved image mentioned above.

So after explaining this, I’m asking if you would kindly give advice what possible path to use to do what I explained above :pray:

Here are my blocks currently. Oh, and I did already get permission to WRITE and test an apk not only companion:

blocks1

blocks3

I’ve an horizontal_arrangement inside a card_view layout.
so it seems each time I call (clicking on image) ImageViewer1.Create (even previously setting path to: “”)
it open a new Horizontal_arrangement (HA_CV_image_zoom) with image over previous image.

I want to click on an image (inside a cardview) and open the image link in an horizontal arrangement via “imageViewer” taking info for the card view from a list CX_X_Carrello.

Am I missing something?

why does the quality of the image is so much low? can i use this extension with another component? bcz i need HQ quality images in my app thats why

1 Like

Hello, Thank you, nice extension. :grinning:

One question, Would there be a way to use this extension on Android 10 or higher?
Because, I am testing this extension in Android 9 and 10. In Android 9 works fine, but with Android 10 the image never shows in the arrangement. Even with storage permissions working good in both Android.
I mean, I pick an image from my device, and set the path of the picked image to “path” of the imageViewer ext. but with Android 10 the image doesn’t show. What could I be doing wrong?

I’ve already solved it, using just “image component”: Set Image.Picture > Join: (file://) + file path. No extension :sweat_smile:

anyway thanks

1 Like

is it working on android 12?