Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (webview)
Viewing all articles
Browse latest Browse all 680

Android webView to large or zoom disabled, get the phone brand

$
0
0

Hi,

I'm using a lot of webView in my apps and it seems that android have some issues with it. I test my apps on my Wiko and webViews are to large, something like twice bigger than the screen.

So i found a solution, i add the following code in the html or css.

"<html><meta name='viewport' content='initial-scale=1.0, minimum-scale=1.0, maximum-scale=10.0, user-scalable=no' /><head><link rel='stylesheet' type='text/css' href='html/css.css'></head>";
initial-scale : actual zoom minimum-scale : minimum zoom maximum-scale : maximum zoom user-scalable=no = disabled the to large webView

But in other phones like Samsung or Sony, with this code, we can't scroll anymore. This is because of the user-scalable=no, so if I remove it, it works fine on this phones.

My point is that I want to know if it's possible to get the phone's brand (like Samsung, Sony, Wiko, ...) or if there is an other way to deal with webViews.


Viewing all articles
Browse latest Browse all 680

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>