Move (not remove) webview's zoom button, without access to source HTML

433 views
Skip to first unread message

Joel R. Putnam

unread,
May 18, 2017, 11:02:33 AM5/18/17
to mitappinv...@googlegroups.com
Hi there, I know there have been a lot of questions about how to remove the zoom buttons from a webviewer (last I checked you can't unless you edit the HTML filed being viewed yourself). I've got a published app in the google play store that people enjoy, but users keep asking for me to do something about the zoom button because it keeps getting in the way of things.

So, two questions:

First: is it possible to *move* the zoom button from its default lower right corner position? It would be much less obtrusive in my particular case if it were in any of the other three corners.

Second: would it be possible to create a sort of "wrapper" html file that contains the needed no-zoom code, but then passes through and displays the page you'd otherwise wanted displayed, maybe in an iframe? My app displays multiple specific pages and needs to allow the user to be able to navigate between them not only via app controls but also regular hyperlinks on the pages.

Ideas? Thank you!

EDIT: I realize I specified this in the title but that it might not be obvious from the body of the post: I do not have access to the HTML files being currently being viewed in the web viewer. That's why I was asking about the possibility of a "Wrapper"

SteveJG

unread,
May 18, 2017, 11:24:48 AM5/18/17
to MIT App Inventor Forum
Android Studio might help you.  You are using a simplified compiler that is intended for teaching purposes.

However what you want may not even be possible there  http://stackoverflow.com/questions/5125851/enable-disable-zoom-in-android-webview  in a good way.

You might be able to create an extension for AI to do what is mentioned in the article.



Pavitra

unread,
May 18, 2017, 12:15:25 PM5/18/17
to MIT App Inventor Forum
Add this tag to remove zoom controls from your webpage

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

Joel R. Putnam

unread,
May 18, 2017, 12:18:35 PM5/18/17
to mitappinv...@googlegroups.com
Add this tag to remove zoom controls from your webpage

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />


Like I said in the title of the post, I don't have access to the original HTML files being viewed. I'll edit my original post to further emphasize that.

Joel R. Putnam

unread,
May 18, 2017, 12:20:03 PM5/18/17
to mitappinv...@googlegroups.com
Android Studio might help you.  You are using a simplified compiler that is intended for teaching purposes.

However what you want may not even be possible there  http://stackoverflow.com/questions/5125851/enable-disable-zoom-in-android-webview  in a good way.

You might be able to create an extension for AI to do what is mentioned in the article.


Thanks for the repsonse. I'm aware of the nature of MIT AI2 and its spinoffs (thunkable etc) - I'd like to maybe try Android Studio someday but I don't know Java. I was asking specifically to find out if there's a way to do either of the things listed above within AI2.

I'm not sure I have the skills either to create such an extension. But before someone goes to the trouble of building one, I'd be curious to hear other ideas.

That said, if you're reading this and have the skills to build such an extension, you'd probably prove pretty popular among the crowd here as this appears to a be a frequently requested feature.
Reply all
Reply to author
Forward
0 new messages