无法隐藏 Intel XDK 启动画面
Can't hide Intel XDK splash screen
我创建了一个小游戏并使用 Intel XDK 创建了构建。我将它安装在设备中,可以看到启动画面。我尝试了其他主题中提到的方法,但无法删除启动画面。
function onDeviceReady(){
if( navigator.splashscreen && navigator.splashscreen.hide ) {
navigator.splashscreen.hide();
}
if( window.intel && intel.xdk && intel.xdk.device ) {
if( intel.xdk.device.hideSplashScreen ) {
intel.xdk.device.hideSplashScreen();
}
intel.xdk.device.setRotateOrientation("landscape");
intel.xdk.device.setAutoRotate(false);
intel.xdk.device.hideStatusBar();
}
}
document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
这是我启动应用程序时的初始状态。
我在项目中添加了这个插件
cordova-plugin-splashscreen
请帮我解决这个问题。
在 XDK 论坛上收到此答案
The purpose of the splashscreen is to hide the details of the
initialization process (even before your device ready fires). The
splashscreen you see is the default cordova splash screen, you can
replace it by your own graphics. You can upload custom splashscreen
through Launch Icons and Splash screens on Projects page. The
hidesplashscreen() method will hide the splashscreen that is displayed
at the initialization and the contents of your app will appear (which
happens when device is ready).
我创建了一个小游戏并使用 Intel XDK 创建了构建。我将它安装在设备中,可以看到启动画面。我尝试了其他主题中提到的方法,但无法删除启动画面。
function onDeviceReady(){
if( navigator.splashscreen && navigator.splashscreen.hide ) {
navigator.splashscreen.hide();
}
if( window.intel && intel.xdk && intel.xdk.device ) {
if( intel.xdk.device.hideSplashScreen ) {
intel.xdk.device.hideSplashScreen();
}
intel.xdk.device.setRotateOrientation("landscape");
intel.xdk.device.setAutoRotate(false);
intel.xdk.device.hideStatusBar();
}
}
document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
这是我启动应用程序时的初始状态。
我在项目中添加了这个插件 cordova-plugin-splashscreen
请帮我解决这个问题。
在 XDK 论坛上收到此答案
The purpose of the splashscreen is to hide the details of the initialization process (even before your device ready fires). The splashscreen you see is the default cordova splash screen, you can replace it by your own graphics. You can upload custom splashscreen through Launch Icons and Splash screens on Projects page. The hidesplashscreen() method will hide the splashscreen that is displayed at the initialization and the contents of your app will appear (which happens when device is ready).