Hello World Phonegap App在iPhone 6上的分辨率错误

时间:2016-04-22 10:25:04

标签: iphone cordova phonegap-build

我花了一段时间试图对此进行排序,并找到了一个我已经丢失的未回答的问题。但接下来是节拍:

我使用了phonegap create . my.app.id并且它创建了一个hello world锅炉板,在iphone 6上看起来很糟糕。有黑色条可以将它缩小到iPhone 4大小并且分辨率错误。

症状是应用程序上方和下方的黑条,状态栏和键盘分辨率错误,应用程序模糊不清。

1 个答案:

答案 0 :(得分:1)

您需要做的是指定更多的初始屏幕尺寸。这就是控制不同设备上的分辨率......我知道,不要问。

对于Android,您需要以下内容:

    <splash src="..." density="land-hdpi"/>
    <splash src="..." density="land-ldpi"/>
    <splash src="..." density="land-mdpi"/>
    <splash src="..." density="land-xhdpi"/>
    <splash src="..." density="port-hdpi"/>
    <splash src="..." density="port-ldpi"/>
    <splash src="..." density="port-mdpi"/>
    <splash src="..." density="port-xhdpi"/>

对于iOS,您需要以下内容:

<splash src="..." width="320" height="480"/>
<splash src="..." width="640" height="960"/>
<splash src="..." width="768" height="1024"/>
<splash src="..." width="1536" height="2048"/>
<splash src="..." width="1024" height="768"/>
<splash src="..." width="2048" height="1536"/>
<splash src="..." width="640" height="1136"/>
<splash src="..." width="750" height="1334"/>
<splash src="..." width="1242" height="2208"/>
<splash src="..." width="2208" height="1242"/>

如果仍未正确显示,请检查此列表中是否缺少另一套。