Webview pinch to zoom

397 views
Skip to first unread message

Heather

unread,
Sep 5, 2014, 2:59:43 AM9/5/14
to tas...@googlegroups.com
Hello all,

I have a scene with a webview in it that won't zoom in or out. It's made of a direct HTML code that consists primarily of an <img> tag. I tried adding the following meta tag with no success.

<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes"/>

Any ideas?

Sean Williams

unread,
Sep 5, 2014, 9:19:29 AM9/5/14
to tas...@googlegroups.com
What happens if you remove the additional scaling,

<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, width=device-width" />

What version of Android are you testing on?

Heather

unread,
Sep 5, 2014, 11:13:15 AM9/5/14
to tas...@googlegroups.com

There is no change in the lack of ability to zoom in the scene's webview. Also, if the html code is simply in an .html document and opened in Chrome, with either meta code or even no meta code at all, I can pinch to zoom. It's just in the Tasker scene webview that it doesn't work.

I'm using Android  version 4.4.2.

What happens if you remove the additional scaling,

<meta name="viewport" content="initial-scale=1.0, user-scalable=yes, width=device-width" />

What version of Android are you testing on?

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/QJWHgSZ21pg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Sean Williams

unread,
Sep 6, 2014, 6:19:29 AM9/6/14
to tas...@googlegroups.com
Its not clear to me how Tasker has zoom implemented in webview. To enable zoom functions you can use the scene action, element web control, show zoom controls at which point pinch to zoom becomes available but with visible zoom controls too.

Heather

unread,
Sep 6, 2014, 11:06:13 AM9/6/14
to tas...@googlegroups.com

Yuck I was hoping to avoid the visible controls. I wonder why this is the case for webview, as in why doesn't it behave like the traditional browser? Strange.

Sean Williams

unread,
Sep 8, 2014, 4:44:27 AM9/8/14
to tas...@googlegroups.com
Maybe its due to an older implementation, wasnt pinch to zoom added to android?

Heather

unread,
Sep 8, 2014, 6:08:20 PM9/8/14
to tas...@googlegroups.com
No idea. Is this something Pent might be able to update?

Sean Williams

unread,
Sep 8, 2014, 10:19:05 PM9/8/14
to tas...@googlegroups.com
Maybe with setDisplayZoomControls

What I have noticed is google are putting an emphasis on web development which could make controling things in webview even more useful in future.

Heather

unread,
Sep 9, 2014, 10:33:37 PM9/9/14
to tas...@googlegroups.com
I found this, which includes the setDisplayZoomControls, but it appears that it will likely be something Pent has to change in Tasker. Unless there is a way I can incorporate some code into the direct HTML source of the webview to override what Tasker currently has set up. Is this possible?

Matt R

unread,
Sep 11, 2014, 1:19:49 AM9/11/14
to tas...@googlegroups.com
It seems like it's controlled by android and not something that could be modified with JavaScript or HTML code. I think it requires a "hide zoom controls" action that's the corollary of the current "show zoom controls" action in scene > element web control.

Matt

SportyRydr

unread,
Aug 18, 2018, 3:01:56 PM8/18/18
to Tasker
Thank you!!
Reply all
Reply to author
Forward
0 new messages