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

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?

I can see no reason why it should not work…
And if you have an issue, what about providing a screenshot of your relevant blocks?
Taifun

Hello everyone,
sorry if I reopen the discussion after a long time.
I write because I have an image loading problem with this extension.
I’m attaching a screenshot of the test I’m doing
Sreenshot

I have a JPEG image (named “1.jpg”) in the “Pictures” folder of the device’s internal memory
With the blocks I’ve shown, the “1.jpg” image is shown perfectly on Android 9 and 10 but on Android 13 (api31) the screen remains blank (the image is not shown)
I thought the “Pictures” folder was a free folder and shared with all Android versions…
Do we need special permissions to access this folder on Android 13?
I searched for information on the net and I read that the permission must be added to the “AndroidManifest.xml” file: “android.permission.READ_MEDIA_IMAGES”
I tried to make this change but still NOT solved.
Can anyone give me a hint on what to try?
Thanks to anyone who can help me
Paolo

sorry, I wrote Android 13 (API 31)…actually it’s Android 13 (API 33)

Paolo