Reputation: 5848
I have an app built with Phonegap. It looks fine on all iPhone screen sizes (in simulator) but i can't seem to get rid of the ugly black border. Also the screen of the app that does show within the border looks like it is way zoomed in and i can't even scroll to the bottom of the page.
Here is a screenshot of it:
I know it has something to do with this tag in my index.html file:
<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"/>
I can't seem to get the correct settings. Note, I have already tried using this: target-densitydpi=medium-dpi as was suggested on another similar question on this forum but that did not work (also his issue was not exactly the same as mine)
Note, this screenshot is from the 9.7 inch screen, but i would like a solution that would work for the larger iPad screen and also not break for the iPhone screens.
thanks in advance...
Upvotes: 3
Views: 278
Reputation: 1127
In your config.xml file you need to enable both handsets type.
You most probably have currently:
<preference name="target-device" value="handset"/>
or you won't have any preference for target device at all. You must make an entry or change the entry above to:
<preference name="target-device" value="universal"/>
That way the build will be compatible with both iPad and iPhone devices.
Upvotes: 4