Today I present my Image Viewer extension. You can use this extension to view images like Facebook and Instagram etc. The user can double tap or pinch to zoom. It supports all images : URL, assets, local.
Blocks
Create Image Viewer in a layout.
Layout : Arangements, Cardviews etc. Path : Path to image. You can change it later
Event triggered when scale changes. You can find current scale, x and y positions.
Change image path. It supports all images : URL, assets, local.
NOTE : The extension loads images asynchronously but doesn’t support caching. The caching issue can be hopefully fixed if @DevYB makes slight changes in his extension.
Just pass the path to local image and the rest will be handled by the extension but you need to have storage access permission if you want to show image from storage.
Again Awesome Extension Superb
Can we use multiple Images
I mean If Slide right then open next image & If slide left then open previous Image ??
Is it possible ??
@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).
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 :
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.
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).