Lazarus

Programming => Operating Systems => Android => Topic started by: xinyiman on October 25, 2019, 12:05:30 pm

Title: Android and zoom with 2 finger control
Post by: xinyiman on October 25, 2019, 12:05:30 pm
Hi guys, I have the following need. Display an image (the source is in base64) and then be able to zoom the image perhaps using the classic 2-finger control. Are there any examples to do this?
Title: Re: Android and zoom with 2 finger control
Post by: xinyiman on October 28, 2019, 09:49:53 am
No suggestion?
Title: Re: Android and zoom with 2 finger control
Post by: jmpessoa on October 28, 2019, 06:25:18 pm

Hi, xinyiman!

You can try the demo "AppPinchZoomGestureDemo1"
Title: Re: Android and zoom with 2 finger control
Post by: xinyiman on October 29, 2019, 08:31:56 am
Now I look this example.

Thank you very much  ;)

Title: Re: Android and zoom with 2 finger control
Post by: xinyiman on October 29, 2019, 12:25:49 pm
Hi jmpessoa, I tried the example and it works pretty well. Only two things

1. the image should resize as I move my fingers and not to release

2. the image should zommare even if it exceeds the dimensions of the panel, but facnedo see only the part on which I acted with the fingers

Is there such an example?
Title: Re: Android and zoom with 2 finger control
Post by: jmpessoa on October 30, 2019, 09:18:44 pm

Hi, xinyiman!

Sorry, at the moment I dont have another "zoom" demo App...

but you can try pack your image in a html format and try load it using


jWebView1.LoadFromHtmlString(....)

or

jWebView1.LoadFromHmtFile(....)

Title: Re: Android and zoom with 2 finger control
Post by: xinyiman on November 05, 2019, 10:08:35 am
I did a lot of testing but I couldn't get the zoom solution correctly. I think the problem is that the jImageView component always scales the image to be displayed. Isn't there a way to see the unscaled image? Then I'll do the related resizing. Or if you have other suggestions, they are welcome.
TinyPortal © 2005-2018