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.