Phone Gap and orientation resizing

Phonegap-LogoMy little application was put on hold for awhile for testing, feedback etc. and in that time PhoneGap released a bunch of new versions. So today I updated to version 2.2.0. It was quite different to 1.9 that I had been using so took a bit of re-jigging to get back to running state again.

I’d previously had it working well but just before I sent for submission I realised my orientation resizing was broken. I could start in an orientation and it’d look great but if i started in portrait and moved to landscape i’d get big black areas or if i started in landscape i’d lose 1/2 my menu. Oddly, this was just supposed to work and after much head-scratching this is what I changed:

This is the default meta tag I got from phonegap:

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

and this is what I changed it to after reading a bunch of other posts, comments and trial and error:

<meta name="viewport" content="width=device-width, minimum-scale=1.0,  maximum-scale=1.0"/>

Technorati Tags: ,,