How do you zoom image by finger pinch in mit ai2?

How to zoom image by finger pinch in mit ai2??

A forum search would have revealed several methods. YOu cannot zoom/pinch an image in an image component or canvas (easily) or arrangement. You need to use the webviewer. See link below for some examples:

There are several zoom related extensions found on this page.

App Inventor has it’s scale detector extension

actually i am new to app building.can you please give me example or .aia file??

thanks TIMAI2 issue resolved.

but i have more than 20 images for that i have to make 20 html file.

or is there other option?if yes than please tell with example.


You may also want to look at the ScaleDetector extension:

Do you want to display all 20 images at once ?

If not just replace the image sent to the html file using the webviewstring.

If you want to show all the images, you can load then all into an html file if you want to…

1 Like

Actually you don’t need to have an html file to display an image. You can send the image path as the webviewer url and it will display it.

Correct, this was evident in the other topic I linked to, where the developer need to control the size of the image displayed as well. If the image size is within bounds (e.g. webviewer set to 360x240 and image is >360x240, then not an issue)

1 Like

i want all 20 display but condition based. hen one button clock show one and other click so other…so on…like this

i dont know how to use…can you guide or give link to tutorial of this?

may you please give an example of this??

please try something yourself and if you get stuck, then post a screenshot of your relevant blocks
here is a simple example

A very good way to learn App Inventor is to read the free Inventor’s Manual here in the AI2 free online eBook … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here and the aia files for the projects in the book are here:
How to do a lot of basic things with App Inventor are described here: .

Also do the tutorials to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

can you give me html code for
fit to screen
Height = fill parent
width = fill parent
back ground image = none

You set that in your blocks/designer for the webviewer, and then for the image as i indicated above:

Here you go,

<head><title>Fill Parent</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<img src="/storage/emulated/0/Pictures/abcd.png" width="100%" height="100%"/>

Type in the image source in img src.
Remove the height="100%" attribute if you don't want your image to be resized.

I tried finding things about zoom in the forum, but this doesn't help to zoom the image.