简体   繁体   中英

Phonegap Android : meta tag “Viewport” is ignored

I am using Phonegap 1.4.1 on a Android 2.2 Samsung Galaxy Tab. I tried to adjust the viewport with the meta tag viewport with content="width=1024" but the tag is ignored. I already tried solutions like this one Android-- PhoneGap/WebView ignores viewport meta tags? But none of the solutions I found so far worked. Do you have any advice?

Thanks in advance.

I've found an article saying that the viewport for samsung galaxy tab 7.0 was a bit weird. It display the width as 683px and 330px height. For more details click here

Hope that helps

Try using:

document.body.style.height = screen.height + 'px';

in your onDeviceReady function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM