Android app screen scaling problem

225 views
Skip to first unread message

gecko64

unread,
Oct 29, 2012, 3:54:04 PM10/29/12
to phon...@googlegroups.com
We have an app with a layout designed for iPhone (960 width), but trying to get it to work on Android now. We have set the viewport tag to this:
<meta name="viewport" content="width=960, target-densityDpi=device-dpi, maximum-scale=2.0, minimum-scale=0.1, user-scalable=yes" />

And it scales perfectly when viewed in Android's web browser. However, when packaged with phonegap, it does not scale down to the device screen -- so with an 800x480 device screen, about 20% is offscreen, forcing scrollbars. We've tried all sorts of variations on the viewport metatag but cannot get it to scale to the device screen, even though that works just fine in the Android web browser. Any suggestions?

thanks!
Dave

gecko64

unread,
Oct 31, 2012, 9:47:00 AM10/31/12
to phon...@googlegroups.com
After MUCH experimentation, I finally solved this:
<meta name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=yes" />

I don't know why scaling has to be set at 0.5 to make the app scale to fit the screen, but it does. 
Reply all
Reply to author
Forward
0 new messages