所以我使用phonegap来构建应用程序.我有正在显示的启动画面,并在config.xml中列出.
<gap:splash src="splash/android/ldpi.png" gap:platform="android" gap:density="ldpi" /> <gap:splash src="splash/android/mdpi.png" gap:platform="android" gap:density="mdpi"/>
<gap:splash src="splash/android/hdpi.png" gap:platform="android" gap:density="hdpi" />
<gap:splash src="splash/android/xhdpi.png" gap:platform="android" gap:density="xhdpi" />
Run Code Online (Sandbox Code Playgroud)
问题是,当我在我的三星galaxy skyrocket 2手机上测试它时会显示"hdpi.png"图像,当我在三星Galaxy 10英寸平板电脑上测试它时会显示mdpi.png图像.
这不应该是另一种方式吗?
基于android规范(见上图)我的mdpi.png大小为320x480,hdpi.png为480x800,因此mdpi.png在平板电脑中出现了拉伸.
怎么解决这个问题?你认为我应该为mdpi定义多个初始屏幕尺寸,例如普通屏幕32x480,大屏幕480x800等.但是如果我们采用这种方法,那么如何在config.xml中定义它?因为我们只根据间隙进行过滤:density ="mdpi"或者我们是否应该添加尺寸,因此在同一间隙中添加多个条目:density ="mdpi"?