更新时间:2022-12-21 18:43:16
您应该为不同的屏幕尺寸提供不同的启动屏幕.
You should provide different splashscreens for different screen sizes.
根据phonegap Wiki( https://github.com/phonegap/phonegap/wiki/App-Splash-Screen-Sizes )的大小应为:
According to the phonegap wiki ( https://github.com/phonegap/phonegap/wiki/App-Splash-Screen-Sizes ) the sizes should be:
LDPI:
Portrait: 200x320px
Landscape: 320x200px
MDPI:
Portrait: 320x480px
Landscape: 480x320px
HDPI:
Portrait: 480x800px
Landscape: 800x480px
XHDPI:
Portrait: 720px1280px
Landscape: 1280x720px
XXHDPI:
Portrait: 960px1600px
Landscape: 1600x960px
XXXHDPI:
Portrait: 1280px1920px
Landscape: 1920x1280px
您可以将config.xml指向您提供的启动屏幕,例如:
You can point in your config.xml to the splashscreens you provide, for example:
<gap:splash src="res/screen/splash_ldpi.png" gap:platform="android" gap:qualifier="port-ldpi" />
<gap:splash src="res/screen/splash_mdpi.png" gap:platform="android" gap:qualifier="port-mdpi" />
<gap:splash src="res/screen/splash_hdpi.png" gap:platform="android" gap:qualifier="port-hdpi" />
<gap:splash src="res/screen/splash_xhdpi.png" gap:platform="android" gap:qualifier="port-xhdpi" />