简体   繁体   English

获取Phonegap应用以在iPad和iPhone之间正确缩放

[英]Getting Phonegap app to scale correctly between iPad and iPhone

I am facing an issue with my Phonegap build in that the app I am building is locked into a landscape orientation and built to iPad dimensions (2048x1536px). 我在我的Phonegap版本中遇到问题,因为我正在构建的应用程序被锁定为横向,并以iPad尺寸(2048x1536px)构建。

When I open the IPA on my iPad, all is fine. 当我在iPad上打开IPA时,一切都很好。

When I open the IPA on my iPhone it scales down to the width of the device, but as the app is locked into landscape orientation, I actually need it to scale to the height of the device. 当我在iPhone上打开IPA时,它会缩小到设备的宽度,但是当应用锁定为横向时,我实际上需要将它缩放到设备的高度。 (Sounds easy, right?) I have run through a number of available config and index settings trying to get a solution, but it only gets worse, not better. (听起来很容易,对吧?)我已经尝试了许多可用的配置和索引设置,以寻求解决方案,但是只会变得更糟,而不会变得更好。

I'm wondering if anyone can suggest a means to do this. 我想知道是否有人可以建议一种方法来做到这一点。 The config has two relevant settings 该配置有两个相关设置

name="fullscreen" name="EnableViewportScale" name =“全屏” name =“ EnableViewportScale”

and the Index HTML, which the app calls on load, offers a generic viewport setting. 该应用在加载时调用的Index HTML提供了常规的视口设置。 That is set to in the version that scales to device width (leaving a portion of the app hanging off the bottom of the screen when held in its required landscape position). 将其设置为可缩放至设备宽度的版本(将应用程序的一部分悬吊在所需的横向位置时,其一部分悬于屏幕底部)。

Anyone know a solution? 有人知道解决方案吗? How can I get the html to go "this is in landscape, so I should scale to device height." 我怎样才能让html进入“这是横向的,所以我应该缩放到设备高度”。

Which web framework are you using? 您正在使用哪个Web框架? I do this in jquery mobile to scale to full screen and it has been full screen whatever the size of my device. 我在jquery mobile中执行此操作以缩放到全屏,无论我的设备大小如何,它都已全屏显示。

http://demos.jquerymobile.com/1.2.1/docs/toolbars/bars-fullscreen.html http://demos.jquerymobile.com/1.2.1/docs/toolbars/bars-fullscreen.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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